Very odd issue, it looks like you set up everything correctly. You might to try clearing the cache for the query. This bug has popped up randomly in the past and some users found that deleting the resource and creating it again has sometimes solved it
One last thought, can you screenshot the query metadata from the state tab when you are running the query with the params in the query input field vs when you add the params to the connection UI and run a get from there?
You can find the metadata by clicking the state tab on the left then using the three row symbol below the word 'state' to select the query in question.