There is a way to copy capacity planning from the previous sprint to the current sprint in Azure DevOps, as described in the following documentation: Copy capacity planning from the previous sprint. However, there is no built-in way to automate this process for multiple teams. It is possible that some team members do not carry over because they were added to the team after the previous sprint, or because their capacity was not set in the previous sprint. As for automating the process, you may want to consider using Azure DevOps REST API to create a script that copies capacity planning from the previous sprint for multiple teams.
References: