I am using 3D, but maybe this applies to 2D as well.
The only thing I can think of is by using a downward-facing RayCast, the length of the player, that is only enabled when the player is jumping and turns off when they are not jumping.
When the player hits the ground, the RayCast is disabled so you won't kill the enemy while on the ground. The length of the RayCast can then be fine-tuned for smoother gameplay.