Query filtering by distance not reliable

I currently have a distance column thats calculating the distance between whatever location the User inputs, and the stores location. I am then running a query(without getting too much into the backend filtering, a query is needed.) and sorting said query by that distance column. This allows the customer to see the stores closest to them.

This has proven to be very unreliable, I can enter a cities name and it works perfectly, enter a different city and it works, then enter the intial cities name and suddenly the distance is over 10000kms, and then it just stops working for any input until you fully refresh the page. The weird part about this is, its correct in the query. If I go over and look at the query in data, the order is perfect. I then go back to the collection in app, and the order is wrong.

So for some reason it sometimes works in the layout, despite always being correct in the data query. You type in a city it works perfectly, you clear everything with a button action and input the same city and it suddenly won’t work. No data has changed in that time. Seriously stumped.

Please submit a ticket. Thanks a lot!