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.