The connection string from SQLDatabase failing with the Prisma CLI was a bug fixed in Encore v1.41.4. Fix: update Encore to v1.41.4 or later and your original code should work without the CLI workaround.

_Source: gh:encoredev/encore#1388 (Encore Cloud)_