Add an instance boolean variable to player to keep track of InvinciblePowerup - true or false.
In the event where enemies destroy player on collision, add the condition Player InvinciblePowerup = false.
Copy that event, change it to true, and change the action to destroy the enemy instead of the player.