How can avoid the camera moves wrong because the enemy movement...?

[Sorry for bad english]
I have a problem with the camera in a 2D platform game I’m making.
In the game there’s a few ‘rooms’ for the camera script that give the feeling of playing a castlevania’s style game; there’s no problems when I run the game and moving around only with the Player (I deactivate the Enemy), but when I’m running the game with an enemy that chases the Player until the player moved away from his field (box collider 2D trigger) a problem occurs. If the enemy start in Room1 and chases the Player to Room2 and stop following the Player and come back to Room1 the camera leaves the rooms and does not point at the Player… At that moment I think is because of the movement of the enemy leaving the room and the Player staying there… How can I fix that? Thanks…

Can you post the script you’re using for the camera and maybe a screenshot or short video?