I’m wondering if the physics body of the instance is being removed with just a slight delay, in some async process as you describe. Here is a screenshot of part of RemoveInstanceInternal() of HISMC.
Looking at the API, TermBody() cleans up the PhysX data for the instance, which could perhaps indeed be performed in an asynchronous fashion. I really have on idea, but my intuition says that PhysX probably doesn’t run in the game thread.
Actually, I just dug into it a bit more: PhysX can indeed be run in either synchronous or asynchronous modes! You can toggle between the modes here: Project Settings > Physics > Simulation > Async Scene
Is Async scene enabled in your project settings right now? If so, you may indeed be experiencing a race condition with regards to the physics body of the HISMC instance being released. Try turning off async scene and let’s see what happens.
Another option: If you do collision sweeps with GetWorld() instead, you can actually enable or disable async scene collision using FCollisionQueryParams.bTraceAsyncScene.
If it turns out this is what’s happening, adding a boolean to enable/disable async scene tracing when calling GetInstancesOverlappingSphere() would be a good thing for the devs to add.