The player disappears

"I’m having a problem in my scene. I’m rendering the background using a JSON file and a tileset, and that part works fine. The resulting map has a 50x50 grid, and the tileset has 64x64 px tiles. When I add a player and have them followed by a smooth camera, after a while, the player disappears. If I stop and move in a different direction, the player reappears. No, it’s not possible that they are hidden behind some layer. Do you have any ideas what could be causing this and how to fix it? For now, I’m just asking generally if anyone has dealt with a similar problem, I can provide more resources later.

Put text object in your scene
And add action to change text to

"X "+Player.X()+"
Y "+Player.Y()

And you will see its position in runtime
So you can at least deduce if he is still there

Also are you by any chance using Ysort behavior?

Thank you for the answer. The problem was a bit tricky: I had a custom collision mask on the player, which caused the entire sprite to collapse when rotated to a different direction than the default, making it disappear from the scene completely. It was fixed by reverting to the automatic (default) collision mask.