I believe the other plane was an F-5 with a single vertical tail. Not saying this movie scene was accurate or could ever actually happen, but theoretically the single center tail could allow the F-14 with twin tails to get that close.
It was a fictionalized Movie, but it was funny.
“I believe the other plane was an F-5 with a single vertical tail.”
No man, it was a Mig-28! LOL