After posting, I found this thread:
Which describes the same problem, caused by VS code. Using the hint there to use the _historyOffset URL param I was able to find the original contant of the queries and restore it.
Most likely the issue was still caused by VS code sync, but I only noticed these specific empty queries after I disabled VS code sync.
This topic can be closed. (However, having VS code sync working without this problem would be really awesome!)