If the workflow needs to run this action across multiple accounts / stacks, this action only seems to result in the last comment being present on the PR. If using strategy max-parallel: 1 I do not encounter any issues, so seems related to asyncronicity of comments being added. Each flow in the matrix outputs a unique message ID but only one results on the PR.
As a side issue, I frequently see this error crop up when calling actions/github-script@v5:
(node:1609) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.