unity 2022.3.X WebGL "Index out of bounds"

Hello everyone.
We currently have these issues in a web browser after we moved from 2020.3.47f1 → 2022.3.18f1:

"The file ‘sharedassets0.assets’ is corrupted! Remove it and launch unity again! [Position out of bounds!] "
“Uncaught RuntimeError: index out of bounds”
“Error during unity loading: RuntimeError: index out of bounds”.

This stuck happens visually when loading progress is at 90%.

We also tried building with Unity 2021 - everything works fine.

Did anybody face or fix the same issue already?
Thanks!

We found the problem. Adding -buildTarget WebGL to the Unity command line arguments in the pipeline job fixed it for us.