.toISOString() is a JS function, not PostgreSQL, so it can't be passed raw to the db.
.toISOString()
You'll need to calculate that value in the db using a PostgreSQL RPC or a built-in function like TO_CHAR(created_at, 'YYYY-MM-DD"T"HH24:MI:SSZ').
TO_CHAR(created_at, 'YYYY-MM-DD"T"HH24:MI:SSZ')