After upgrading to Pop!_OS 22.04 (which uses COSMIC interface) I am not able to have a transparent dock. The dock is just solid black and there is no option in settings to change its transparency.
I figured it out using this command in the terminal:
gsettings set org.gnome.shell.extensions.dash-to-dock background-opacity 0.4
Use whatever value between 0 - 1 suits you, I am using 0.4.