Gluetun can also be configured to write it's forwarded port to a text file (if your VPN provider supports port forwarding), and then I have a custom script that runs when my qbittorrent container starts to read the port number and change the listening port in the config file. Works great!
God forbid we actually rehabilitate people instead of profiting off of their enslavement and not actually giving a shit if they get better or not.