FWIW,
I would always recommend only listening to the medical people. However, something doesn't seem to make sense here, if I'm reading correctly.
Most injuries when sliding are caused by indecision. Usually decision to slide too late.
Perhaps the doctor is trying to take that decision away altogether for the time being, in order to play it safe.
However, if you are cleared to play, there can be baserunning situations that are nearly impossible to stand up. On those plays it can create tremendous strain trying to stop and stay while standing. You might want to ask the doctor about what you should do in those situations, where it might actually be safer and easier to slide. Sliding sometimes is used as nothing more than a way to stop where you want to.
IMO, It just doesn't make sense to clear someone to play, yet tell them they can't perform the necessary actions to play the game. Kind of a smaller version of telling someone they are cleared to play but they can't throw.
Is it possible your doctor might be a very good doctor without much knowledge of baseball? (it does happen) that some good doctors do not know much about baseball) Seems like he should be cleared to practice but not cleared to run the bases yet. Perhaps the doctor is simply saying he does not want you to "practice" sliding yet. That would make sense!