Orlando almost threw away a 10-point lead when they went just five from 11 at the charity stripe in the final 1:30.
That allowed Philadelphia a last-gasp shot at victory, however Joel Embiid's 30-foot buzzer-beater fell short.
Evan Fournier led the way for Orlando, finishing with 20 points and six assists.
Dragic completed a layup with 6.5 seconds to go to extend Miami's winning streak to four.
Meanwhile, it took a quarter of overtime to separate Oklahoma City and Charlotte, with the Thunder ultimately claiming a 104-102 win over the fast-finishing Hornets.
After letting a 16-point lead slip in the fourth quarter, Oklahoma City eventually rallied behind Chris Paul to hang on for their fifth win in six games.
In Friday's other games, the Milwaukee Bucks cruised past the Atlanta Hawks 112-86, the Boston Celtics had little trouble against the Cleveland Cavaliers 129-117 and the Golden State Warriors defeated the Phoenix Suns 105-96.