You can move the directories within the dovecot vmail container (this keeps the email) .
create a new user in the mailcow interface (or use the api)
then get dovecot to recalculate the quota using doveadm
- mv /var/vmail/example.com/foo /var/vmail/example.net/bar
- Create user bar@example.net in gui interface
- doveadm quota recalc -u bar@example.net