The error can be checked for what type it is. Can you replicate this easily? A completed workflow should be queryable if it is otherwise available. Is the “completed” workflow potentially on a cron or scheduled for another execution via continue-as-new? There is a known issue querying a scheduled-but-not-started workflow.