Header Code Injection is not loading

When I paste a code to inject in the site (or page) header through Ghost admin panel it is not showing up on the page. At some point my website stopped loading code injection for the headers. Footer code injection works fine on the other hand.

I have modified the following files in the core: ghost_head.js, site.js, config.production.json, and defaults.json. The purpose was to remove Portal scripts.

As I understand, code injection should be in the ghost_head.js helper, you can inspect my file on the Pastebin.

How can I track the code injection function and make sure it is not altered by mistake?