Update!
I found the issue was related to rocket loader a feature by Cloudflare
Improve the paint time for pages which include JavaScript.
This article is outdated but kinda helpful, I would recommend just turning off the rocket loader if someone has a similar issue to mine
https://autoize.com/nextcloud-with-cloudflare-security/
Thanks for all the help @szaimen @devnull that commend is very useful ![]()