The solution for this is to edit roundcube/config/config.inc.php and remove mentions of virtuser_file at the end of the file.
The other solution would be to go to System Settings ⇾ Virtualmin Virtual Servers ⇾ Configuration: Defaults for new domains and change Include domain name in usernames option from Yes to Only to avoid a clash. Although, this would only be applied to newly created users.