It’s also worth noting that now that Lord Voldemort is gone, with Mad-Eye Moody, Amelia Bones, and the Hogwarts professors at his side, there is very little that can threaten Harry unless he goes actively looking for it (which, naturally, he will not). The Invisibility Cloak is useful, but it’s not the be-all-end-all of protection, and letting it sit in his possession when Hermione could use it to do heroic things is a rather large opportunity cost.
It’s also worth noting that now that Lord Voldemort is gone, with Mad-Eye Moody, Amelia Bones, and the Hogwarts professors at his side, there is very little that can threaten Harry unless he goes actively looking for it (which, naturally, he will not). The Invisibility Cloak is useful, but it’s not the be-all-end-all of protection, and letting it sit in his possession when Hermione could use it to do heroic things is a rather large opportunity cost.