Ahhh, that’s a pretty ancient server! If you embed the date/time in the query as opposed to trying to use the $$now stuff to recalculate the date range does it work?
Can you try running the query you’re passing in against the server directly via mongo shell or compass etc?
You could try this:
mongoexport --db Export --collection Test --fields myDate --query "{\"myDate\":{\"\$gt\":{\"\$date\":\"2023-08-28T00:00:00Z\"}}}"
And have the calling script create the date/time string and embed in the query as a variable?