NPCs falling through terrain

I’m spawning NPCs that are falling through the terrain when I build and run, but when I run the game in the editor they collide with the ground fine. Someone mentioned there is a slight timeing different between the editor and standalone game. How can I resolve thhis?

well u might want to check that the they arent already spawning half below the ground and check if the transform bieng spawned has a collider attached to it