We know that Kaguya is immortal, so she may went to a lawyer to make a deed for that. She had a looooooooooooooooooot of time to do that.
I quote myself to remind the three-weeks-ago-me: when you drink Hourai, don't count on justice since the Yama herself says "Nope, not in my jurisdiction" with them.