If you modify a Microsoft 365 group from static to dynamic membership, the users who are no longer a member of this group would also be removed from the private channels they used to be a member of.
But it is not possible to use dynamic membership for private channels.
You can however, use some workarounds like running scheduled scripts to update the membership of the private channels.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.