Saying you're retired =/= you're retired. Retirement for fighters is a legal process like it is with any other profession. Fighters need to formally inform the UFC in writing of retirement otherwise they remain active fighters with the organization, and therefore still appear eligible for ranking and testing purposes.
Even I can find this information just through basic publicly available info on the testing and ranking sites. Athletes and their management all know this a hell of a lot better than I would too. Khabib's own team mate Cormier had retired 2 months before Khabib's fight with Justin. They were all well aware of what steps a fighter needs to do to retire and Khabib wasn't doing them.
Cejudo and Cormier were immediately pulled from testing, rankings, and matchup offerings because they actually formally retired. Khabib was not because he didn't. Dana wasn't "not accepting it" because Khabib was keeping his active status with the UFC so of course Dana kept offering him fights.
March is when after that final meeting Khabib and his team finally did all the paperwork to actually retire. One of his managers even admitted that in an Instagram post at the time.