I'm surprised there was no mention of "query planner" in the article. That would be the first thing I would check instead of assuming the driver had a bug.
> Node 17 and below worked, Node 18 and above didn’t.
Given that the same queries worked fine with a different client, that would point to a client issue rather than a server issue.