You can now filter flaky tests by branch using the Test Analytics UI or API.
The filter will limit the list of flaky tests to those for which a flake has been detected one or more times on the selected branch.
To learn more, check out the API documentation.