Unfortunately as long as a console is hacked there isn't really a way to stop the leaks. The Switch for example, if it wasn't hacked then I don't think we would see these game leaks. And leaks for other consoles are nowhere near as common if they even exist at all.
Something similar to this is why game companies usually focus on anti-piracy and DRM mostly in the first week or two of the games launch, because it's the most vulnerable period (As well as the time beforehand, now). Those launch or pre-launch sales are vitally important to success.