var_dump is a good friend
Disclaimer: I havent used Homestead so its possible the error is related to that and much easier to fix than I know. And I am still not at my computer to test things so I am just guessing and assuming below.
Since you said that the site works if you use a regular wp-config with hardcoded db-credentials, I would assume that the problem lies somewhere in the difference between the Bedrock way and the standard way. So thats where I would start looking.
I assume that you are using PHP 7.4 and the curly braces should have been fixed in core. https://make.wordpress.org/core/2019/10/11/wordpress-and-php-7-4/
Make sure that you are running the latest version of WP.
If you are adding any plugins in your composer files, try removing them. I doubt this will help but you never know…
The DB connection error doesnt necessarily have to do with DB connections Sometimes, if you are using the db from an existing install, the site URL is the culprit and I have had times when it was because i had enabled multisite in application.php before WP was installed.
Try backtracing the error by searching in the core files for ”Error establishing a database connection” and start debugging from there. Its also a great way to learn more about whats going on in core.