For us, this did not work. We had to drop ?sslmode=require for it to correctly pull in the database. It will connect with ?sslmode=require, but it won't actually work. We tested on 2 separate Retool accounts.
All of the documentation says to add it, so I'm not sure if it's just something with newer Retool accounts?