In Tony's defense his coaches for the last 6 years at United have been Mourinho, Ole, and Rangnick. I think Ten Hag is the first coach he's had since Van Gaal who a) is suited to his style of play, and b) will not put up with any bullshit (you could argue Mourinho was the same, but Martial was still very young back then, and Mourinho was a prick with an outdated style of play).
And who knows, maybe the Sevilla loan has humbled him a bit, and he's realized that the situation at United wasn't the sole cause of his difficulties, and he can't just rely on his talent alone if he wants to reach the top.
Anyway, it's obvious that he's on his absolute last chance here. The club was clearly ready to sell him before the summer, but he's been given a lifeline due to circumstance (Ronaldo wanting out and the Greenwood situation). He's done remarkably well in pre-season, so hopefully he's turned a corner.