Turns out my database had been automatically migrated from a vercel database to a Neon database without my knowledge, which explains the change in behaviour. The fact that this can break deployements is a bit worrying, and also the fact that I was not notified annoys me a bit.
I changed my dependencies from @vercel/postgres-kysely to use kysely-neon. This seems to work.