if you have the wall up before you go invisible, then you'll stay invisible the entire time. the only thing that breaks from hazard effects triggering is normal stealth.
turn-based mode makes the mechanical difference more obvious - for normal AoEs you can run in and out of them during your turn without getting hit, regardless of tick frequency or timing. with hazards, you trigger their effects as soon as you enter their zone, and for each step (making wall spells stupidly good in TB mode because the hazard damage is 6x-ed for TB mode adjustment, even for the per-step damage). but it's a very subtle difference in RTwP honestly, I don't imagine many people are optimizing for this difference, and RTwP came first anyway so it's not like they had this in mind.