So after a few hours of searching I found that changing how i refer to the members database allows me to get the results I was looking for. In the code I pasted above, I simply needed to change:
wixData.query(“PrivateMembersData”)
to
wixData.query(“Members/PrivateMembersData”)
Not sure if it’s a good fix, but it worked for my purposes and hopefully can help others.