On older GTA games, they would often leave you right away if you enter a safe house except in GTA: Vice City. I think the only way you can escape them is by entering the house and the saving the game right away. That would reset your wanted level. Same in GTA IV. In GTA v though you really can't escape them.