My page crashes on Instagram in-app browser

We recently noticed our page was not loading on the Instagram in-app browser and instead it shows a blank screen. I’ve tried mocking that browser, adding a custom device on Chrome Dev Tools using the instagram browser’s user agent.
While debugging I noticed the page is injecting a Cloudflare script:

        (function() {
            var js = "window['__CF$cv$params']={r:'7fb45c513a97952a',t:'MTY5MjgwNDI0Ny43OTUwMDA='};_cpo=document.createElement('script');_cpo.nonce='',_cpo.src='/cdn-cgi/challenge-platform/scripts/invisible.js',document.getElementsByTagName('head')[0].appendChild(_cpo);";
            var _0xh = document.createElement('iframe');
            _0xh.height = 1;
            _0xh.width = 1;
   = 'absolute';
   = 0;
   = 0;
   = 'none';
   = 'hidden';
            function handler() {
                var _0xi = _0xh.contentDocument || _0xh.contentWindow.document;
                if (_0xi) {
                    var _0xj = _0xi.createElement('script');
                    _0xj.innerHTML = js;
            if (document.readyState !== 'loading') {
            } else if (window.addEventListener) {
                document.addEventListener('DOMContentLoaded', handler);
            } else {
                var prev = document.onreadystatechange || function() {}
                document.onreadystatechange = function(e) {
                    if (document.readyState !== 'loading') {
                        document.onreadystatechange = prev;
    <script defer src="" integrity="sha512-bjgnUKX4azu3dLTVtie9u6TKqgx29RBwfj3QXYt5EKfWM/9hPSAI/4qcV5NACjwAo8UtTeWefx6Zq5PHcMm7Tg==" data-cf-beacon='{"rayId":"7fb45c513a97952a","token":"1a2dd5ac6a9c420e977d0e2858d6cccb","version":"2023.8.0","si":100}' crossorigin="anonymous"></script>

but the script is failing because there isn’t a tag.
So, my question is why would it render like this only on this browser, does Cloudflare add an special cache or rules layer for the Instagram browser that could be provoking this issue.

Please disregard. We had a lambda function in CloudFront affecting how the page was being rendered in some user agents.