After upgrading yesterday, it looks like Dynamic Ports have been added to the SQL driver (apologies if this happened previously and I just didn't notice):
However, leaving it blank just gives the timeout (ie can't connect) error.
I didn’t think it had ever worked! I thought it was a limitation of JDBC rather than anything specific to Metabase.
I’ll have a play with my dev environment (no security) and see if I can make it work under certain circumstances.