Addition to what Dr Super Good said. Some unit may cast negative spells on you even when they're hidden. E.g : Curse, Dispell, Mana burn...etc. So the best way is to pause them as well.
Also it will be best if you store those units you want to hide within a variable. Because as far as I know, when you hide a group of units directly without variable, you can't unhide them after that using the unit - Unhide Picked Units. But it works fine for a single unit, only group of units from what I can tell.