Tasks query stuck on "Loading Tasks ..."

That’s not quite true. There can be another difference: Tasks depends on the Obsidian cache to match the file contents, and that occasionally not true. Depending on the history of the vault, the cache can sometimes not match the file content precisely.

Try running the procedure described here: Regenerate the Obsidian metadata cache.