This is a good question. You’d need to work somewhat hard to make it happen on purpose (like a one-way obstacle, for example). Probably little to do with just collision or script since you did not script it this way, surely.
I’d blame the AI + Navmesh and look into what the AI is actually doing / how it’s pathing. Are you using dynamic generation? So many things can happen with it on.