Just now, I accidentally dashed to a hiding spot directly next to an enemy who walked right by me twice without noticing me and I was able to ambush it. Did I just get lucky or is it not possible for enemies to detect you while hiding?
Based on my experiences so far and a tip in this article, being "behind" cover makes you effectively invisible in that enemies cannot spot you while you are doing so (even if they really should be able to...).
You’re completely hidden when in cover.
Persona 5 may look like a traditional stealth game at first, but it isn’t. As long as you’re in cover, you cannot ever be seen by an enemy. Even if it walks past you and comes back up from behind. If you’re in cover, you’re good. So stay in cover.