Code Inject in 404 template

i want try add code injection (to add analytcs, GTM etc), but in error-404.bhs it not works.

Is a expected behavior ? If yes how i can handle this without add the desired script in template ?