Same stacktrace but different issues

The grouping of events is not working as expected for us. We are using PHP and the Laravel plugin. There are events with the same stacktrace but they are grouped in multiple issues. I diffed the “stacktrace” field in the JSON of two events and they are exactly the same besides the local variables.

Do you have an idea? Does it use the local variables and if it is the case, how can I change this behavior in a way that it is not using the local variables (e.g. different user id does not mean that they are different issues)?

Thank you!