I am seeing the "... is not defined" message but the data is displaying and working correctly. So, I would agree it's a minor visual bug but doesn't affect functionality (at least in my case).
I understand the struggle. A variable is a good idea to get around it. I often set up a dedicated query that runs on page load, but Retool could address this.
I know it's been a while, but we recently addressed the underlying cause for a specific class of linting errors. Keep letting us know if you run into additional issues!