Y-sorting not working

Godot Version

4.5.1

Question

I have a world node with y-sorting enabled and an enemy that works with y-sorting. The player is spawned as a child of the world node by a multiplayer spawner. For some reason y sorting does not work for the player. When I manually add a player that player does have y-sorting working but not the ones spawned by the multiplayer spawner. No y-sorting setting are changed in any script in the project.