Megan Fox. Megan Fox is the only flaw of Michael Bay's Transformers: Dark of the Moon. The script by Ehren Kruger ( who wrote Top Gun: Maverick and F1 ) was written with Mikaela Banes ( Megan Fox ) as the girlfriend of Shia LaBeouf's character Sam. But because of some drama behind the scenes ( which involved Steven Spielberg for some reason ), she ultimately dropped out of the project, in very late stages of pre-production. Forcing the team to quickly patch her character out in a very forced and obvious way, replacing her with Rosie Huntington-Whiteley who worked with Bay on Victoria Secret commercials. That ultimately made the film very confusing, emotionally.