It’s honestly not that difficult for a celebrity to hide a disease from the press, especially if the symptoms aren’t noticeable early on. I think Freddy Mercury hid his AIDS for a few years. Depression and forgetfulness are major oversimplifications as to what this poor man went through. His life was fundamentally over in almost every aspect long before his heart stopped beating. For everyone who hasn’t read this link, I would encourage it. It’s a letter from Robin’s wife about his last few months.
I suspect many many more had to. Insurance on films and the risk to go into production on a 100million + budget film is way too much. Marvel knew, had to, absolutely had to as possibly did much many staff on the films if he couldn’t work and had treatment, etc. I lost my mom this year, colon cancer that spread. A colonoscopy would have caught it early and she would still be here with me.