Big names like Metawin and Stake survived hacks before, and players got lucky their funds were safe. But if it’s some random casino with no deep pockets? Good luck. Inside job, outside job… either way, don’t expect them to hand your money back out of kindness.
This is the reason why it's not advisable to keep your funds in gambling account. Because hacking is possible to happen regardless how good their security is. So as a precaution, it's a must to just deposit your money if you're going to use it to play and withdraw if you stop.
Anyway, you can't expect the casino to refund your money when this kind of problem happened. But there are cases wherein the funds are returned to the players because the casino has a a good reputation and backed up funds.