That’s likely because you have a bad cache on your Query Plan. Try adding OPTION (RECOMPILE) to your query.
This isn’t trivial to do but if you go to

Then add Order By 1 OPTION (RECOMPILE) persist in query
That may fix it, give it a shot.
That’s likely because you have a bad cache on your Query Plan. Try adding OPTION (RECOMPILE) to your query.
This isn’t trivial to do but if you go to

Then add Order By 1 OPTION (RECOMPILE) persist in query
That may fix it, give it a shot.