Courier and dovecot use a different maildir layout, so you can not switch from courier to dovecot without changing the folder layout first. If you dont fo that, then ispconfig detects the faulty folders and removes them as they would not work for dovecot.
So before you change from couroier to dovecot, copy allfiles and folders from:
e.g. like this for each mailbox:
mv /var/vmail/domain.tld/user/* /var/vmail/domain.tld/user/Maildir/
mv /var/vmail/domain.tld/user/.* /var/vmail/domain.tld/user/Maildir/
You can ignore the errors that you get from the mv commands.