Yeah, enemies are still attacking while you're in VATS; and there's a period of time after you're shooting that you remain in VATS doing nothing that you can be taking damage during.
VATS isn't meant to put you in god mode. It simply allows you to target specific body parts. All combat still happens as a back and forth exchange, albeit at a much slower pace.