Oops, I forgot to add the invulnerability phase to the invincible enemy I created specifically for testing the jump mechanics. I only added it to the non-invincible enemy that I plan to include in the final version of my game. Unfortunately, while it helps somewhat it still doesn’t solve the problem in its entirety.