Sure, it would works.
According the link you’ve sent:
To use Google Tag Manager on a page with a Content Security Policy, the CSP must allow for the execution of the Google Tag Manager snippet, which is an inline JavaScript snippet that injects the gtm.js script. There are several ways to do this, such as the use of a nonce or a hash.
So, if this is your script inclusion code:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;var n=d.querySelector('[nonce]');
n&&j.setAttribute('nonce',n.nonce||n.getAttribute('nonce'));f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-{YOUR-CONTAINER-ID}');</script>
<!-- End Google Tag Manager -->
you need to set the following header:
Content-Security-Policy: script-src 'sha256-3eU4RLrhTz2w1fRbcpodH7uJHoukn1a8sGOQ7WufMLY=';