In my opinion going to a physical casino has its advantages as well as disadvantages. It's okay to be entertained but there is no real guarantee of winning in gambling. If the person loses if he is sick it will be worse for his health. He will never recover physically if he worries too much after losing. In order to maintain his health he should keep himself occupied with activities other than gambling that will help him recover quickly.
considering his compromised health condition, it is better to avoid gambling first until he recovers.
However, if the person is a gambling addict, and cannot give up his gambling activities. It would be better in my opinion to keep gambling online rather than going to a physical casino.
At least by continuing to let him gamble can make him feel happy and increase his immunity. but sticks to a smaller budget allocation than usual when visiting the casino, and he also doesn't mind losing some of his money. rather than forcing him to immediately leave and stay away from gambling which makes his mind confused and that can also affect his health.
Well, for others gambling is a stressful hobby especially those who lose way too much and that's inevitable in all online gambling sites.
But I do agree with OP that one of the health benefits of online gambling is avoiding contagious diseases like the one example that he gave. Especially in these days where different kinds of disease are spreading out, well the pandemic made a good example of that.
If he is a gambling addict then he is better off gambling. That way he may save that money and use it for buying his own medicine. It's not like the gambling sites are going away. They will always be there waiting for new customers to come in and I doubt they will just close down because of one gambling addict turning around and doing what is necessary while he is sick. Keeping himself healthy. Gambling is also a time consuming game, he might not be able to take care of himself if all he thinks about is playing.