That sounds like “It works on my computer ™”. Fact is that container doesn’t stop user to do silly things.
I think you are not saying full picture about your setup - there can be many moving parts between Grafana container and user browser. (Like this chap). People especially on AWS are adding services to their stack without thinking about consequences (e.g. hooray, there is AWS caching, WAF, CloudFront, Global accelator, … let’s use it to be safe, faster, cool, …).
And you have symptons for this. It looks like your browser may have old frontend code, but ECS task served new code, so it is messing (e.g. gf is not defined).
I asked “Of course delete all caches, cookies in the browser, so there is no reference to old code in the browser at all.” but you didn’t respond. I appreciate if you follow my requests, otherwise we can save your/my time.