It is a common misconception that a touch-and-go means the pilot will be doing pattern work, however this is not the case.
Even if ATIS denies pattern work, aircraft may still fly inbound, conduct a touch and go, then depart the airspace. That is why the option still exists for aircraft that are airborne.
If you are departing though the option to request pattern work will be unavailable, greyed out in the ATC menu. And when you take off, if it’s currently not allowed, you will be told to depart the airspace.
It’s quite a fun exercise to try though if you are inbound, if you just want to quickly visit an airport then promptly leave.