You only need the pre-hiding snippet if Target is loaded asynchronously. It is asynchronous via the GTM.
However, here you still have to consider which rules are created in GTM to load Target. If there are rules or conditions that control whether the target should be loaded at all (e.g. Consent etc.) - this is important to know.
An elegant method is - to write a kind of wrapper code around the pre-hiding snippet - which checks the same condition if Target should be loaded at all. Classic example is if Consent is present or not. So in case Target is not loaded intitially - the pre-hiding snippet will not be executed.
If Target should be loaded - then Target itself removes the pre-hiding via at.js.