Dashboard not showing same information as the query when run separately

Maybe I'm missing something so I'm writing it here before reporting a bug.
I have IOT devices in the field and a table showing when they were idle.
I wrote a query to show me the top 3 longest idle events for each device.
When showing the query itself - the data in the results table is correct.
When displaying that same question in a dashboard - the 'ranking' system I wrote is not functioning.
I'll note that there are no filters on the dashboard. Just straight up - the same query. Different result.

Is there a difference between the MySQL version in the SQL query editor and a dashboard?

Attached the result in the editor and the dashboard. I refreshed and cleared cache and all the standard 'possible' technical stuff.

Hi @liftech
Post "Diagnostic Info" from Admin > Troubleshooting.
There's no difference between the question and dashboard. Both are requesting the same query. But I cannot tell if you are using caching (https://www.metabase.com/docs/latest/configuring-metabase/caching).
Note that MySQL session variables will not reset on the same connection, so it can give different results depending on if the connection is re-used. See more here https://github.com/metabase/metabase/issues/6550