In UE5 begin play won't work

In my UE5 project begin play just suddenly stopped working in the packaged version. I’ve tried everything like changing the packaging configuration, changing the game state and game mode, I even tried making both those classes C++ classes, I also tried migrating to a different project and it still didn’t work.

Thank you.

we need more details, since you haven’t specified which class is not working no one will be able to give you a quick answer

But if I had to guess, since it’s only on packaged projects you said it’s not working then it might just be because you haven’t configured your project settings

image