There is a Query Store fix in the latest Cumulative Updates of SQL Server 2017, and if you are keeping current with the latest cumulative updates, there’s a script you need to run if you’ve installed CU2 at any point.
First, if you are still on CU2, you might want to consider upgrading to CU4 (released February 17, 2018).
Second, if you previously had CU2 installed (and are now on CU3 or CU4), you want to make sure that you’ve run the script included with CU3 and CU4 release notes.
The script removes plans from Query Store that were captured when running CU2.
Read the whole thing and keep those servers patched.