An advisor relationship is consequential, and losing your advisor has a real cost. Has anyone seen a student take out a policy on their advisor?
I doubt that this will solve any problems. If your advisor dies you just need to move to a new advisor and most universities would be likely to help you do that seamlessly.
But there are other ways as well, that an advisor might not be able to continue with you. Sickness, of course, but also moving away.
And advisor who fears imminent death will probably help you make arrangements also.
And "retiring" on an insurance policy isn't going to be possible unless you insure them for millions of dollars or the equivalent. What you want is to finish your degree, not a modest pile of money.
Life insurance is a way to provide you with something that you lose if someone passes away unexpectedly. In most cases, this would be long-term financial stability, or at the very least the ability to pay for someone's funeral.
But in your case, what would you do with any money you get from an insurance claim? If you lose your adviser, you lose the advice, and no money can buy you that. You will need to find another adviser, but the money from the insurance isn't going to help you with that. The only benefit it would provide you is if your adviser currently pays your salary and you solely rely on that income for an interim time until you have found a new adviser -- but even for that, departments often find ways to support students who have been befallen by such bad luck.