Hasuak Another thought would be to have a gap between the enemy and the wall. only allow the enemy to get within 10 pixels of the wall or whatever.
OR Have an invisible tiled background that sticks out from the wall a little ways that way the player will not be too close to the wall while overlapping the enemy. Make the invisible wall a solid but allow the player to walk through it the same way as you allowed the player to walk through the enemy.
Event 1:
Player on collision with invisible wall -> turn off collisions for invisible wall.
Event 2:
on player collision with enemy -> player will have collision set to off or false
Event 3:
{invert} player not colliding with invisible wall -> turn on collisions for invisible wall.
Event 4:
{invert} on player collision with enemy - Player will have collision set to true
Let me know how that goes.