I'm gonna be honest I have 0 clue why you have problems with miami, I've made some changes with their overtaking to see if that helps. Personally I haven't had issues like this at all. Maybe a mod you have is doing it idk. Could you look over these clips to see if I'm missing anything?
Also with bahrain if it's turn 10 you're talking about where they get on the outside curb and either spin or end up off track, there's not much I could do to prevent that. I've toned down the overtaking in that section to see if it helps.
Edit: I'm gonna do more testing before posting the update