Error when using polygonContains() constraint with ParseSwift SDK

I am trying to use this constraint:

struct Location: ParseObject {
    var originalData: Data?
    var objectId: String?
    var createdAt: Date?
    var updatedAt: Date?
    var ACL: ParseSwift.ParseACL?

    var name: String?
    var locations: [ParseGeoPoint]?

let query = Location.query(
        key: "locations",
        point: myPoint // which is a ParseGeoPoint

But I’m getting a random error. When checking the server logs, the error seems a bit more explicit:

error: cannot cast type jsonb to polygon {“code”:1,“stack”:“Error: error: cannot cast type jsonb to polygon\n at /root/node_modules/p
arse-server/lib/Controllers/DatabaseController.js:1024:21\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)”}

Could this be because I’m using a psql database instead of a mongo one? Or is it something completely different?

Thank you for your help!