Actor spawns at will on shipping package but not on a development package or in PIE - V4.23

The actor spawns at will several times following straight line patterns. Obviously, there is nothing in the actor or in any other BP for it to behave in such way.

I have a reference to the actor in my Ai bp because I need to spawn it from the Ai bp. I was spawning it from a spawn point before and then attaching it to Ai – I thought this was the cause for the bug – but the bug persists regardless.

If I delete the actor in the project, well obviously it does not spawn.
If I rename the actor and repackage, the bug might, or not, be present the first time I run the packaged build, but it is present the second and subsequent times I run the packaged build.

NOTE this is only happening on shipping builds. My package log has no errors, and the actor should only spawn if the Ai is valid: I’m spawning 5 Ai but getting 50 extra actors. You would assume the Ais are failing to spawn but the actor is spawning anyways, but again: the actor should only spawn if Ai is valid.

I’m clueless as to why this is happening, and I’ve been trying stuff for a month now.
Please help.

Could you share the piece of code where you are spawning the actor?

Also is there any reason as to why you are manually creating the AIControllers? Normally when you spawn a character you can set it up so it creates its own AIController. You can do this in any Pawn on the Details section

342669-spawn.png