@xguimard It seems that Synapse does not allow to prevent a user to leave a room whose he is member of.
If he tries to leave then the m.room.member "leave" event will have a sender field and a state_key field equal to his user id. Then Matrix will let the user to leave the room (see https://spec.matrix.org/v1.8/rooms/v11/ section 2.3.5.1).
The Application service receives the event once the user has leaved the room, so it cannot stop the leaving workflow.
Options to do this tickets:
1 - disable the leave button in the user interface for automatic channels
2 - When a user leaves remove the "leave" membership inside Matrix room_memberships table. However maybe the leaving workflow update other things, so remove this membership would not be enough and could break the Synapse server.
3 - Customize Synapse to check if the room has been created by the application service, if it is the case then the user who is trying to leave must be the room admin otherwise send a response with 403 status.