Enemy liquid move through?

Ok,so on special tiles such as water,lava and wall tiles,if you have a pokemon that can go onto it, you can go through enemies,as long as that enemy is on that tile. For example your a wooper in lenile cavern,you go into the water to fight a poliwag,if you want, you may walk through the poliwag because your on water and not land.

I don’t think that’s really a glitch.