Unity DOTS ParticleSystem Doesn't Play Until Game Loses and Regains Focus

Hello everyone, I’m developing a multi-unit game using Unity DOTS.

I’m trying to introduce a flame particle effect (ParticleSystem) at the muzzle of the rifleman. However, after calling ParticleSystem.Play, the particle effect doesn’t seem to play.
Interestingly, if I make the game lose focus (for example, by clicking some buttons in the Unity Editor) and then refocus the game, the particle systems within view start to play normally.

What could be causing this?
Does anyone have any ideas on how to solve this?

EntityManager entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
Entities.WithoutBurst().ForEach((MarineGunFire marineGunFire) =>
{
    var e = marineGunFire.entity;
    
    // get particle system from e
    var particleSystem = entityManager.GetComponentObject<ParticleSystem>(e);
    particleSystem.Play();
}).Run();