First: is it tracking, or a Consent Mode ping?
With Google Consent Mode, the Google tag is allowed to load before the visitor answers the banner and send a request that says consent was not given. That request carries no Analytics cookie. So seeing googletagmanager.com before consent is not, on its own, the problem. What it sends is.
- Open a page in a private window and do not answer the banner.
- In the developer tools, Network tab, filter by
collectand open a request togoogle-analytics.com/g/collect. - Find the
gcsparameter.G100means analytics and ads storage were denied: a Consent Mode ping.G111means both were granted before anyone agreed, which is only right where your setup grants by default on purpose, such as for visitors outside the EEA and the UK. Nogcsat all, plus an_gacookie, means Consent Mode is not set up and the tag is tracking. Nocollectrequest at all before an answer means the tag is being held back.
The guide to checking whether Google Consent Mode works goes through the other parameters.