Thanks to @Aleks, here are the commands that allowed me to remove the permissions that were blocking the restoration:
yunohost tools shell -c "from yunohost.permission import permission_delete; permission_delete('synapse.main', force=True)"
yunohost tools shell -c "from yunohost.permission import permission_delete; permission_delete('synapse.server_api', force=True)"
yunohost tools shell -c "from yunohost.permission import permission_delete; permission_delete('synapse.server_client_infos', force=True)"