I'm sorry for your situation, and hope he recovers.
Unfortunately, if your dad's heart stops, then he will have died, and no CPR can bring him back, that's what DNACPR means. As CPR is aerosol generating, it's restricted to those where it will work even more so than normal, so as not to risk everyone else.
The same applies to if his lungs completely fail, no ventilator can bring him back to life.
Unfortunately, eventually, people who have lived a long life, can't fight off infections, and their lungs struggle, they tire, and their hearts stop, and nothing can be done to stop that natural process. This may not be your dad's time yet, but when it is his time, CPR and a ventilator would cause suffering, and not change the outcome.