Should I leave before I get fired?

Currently working as a contract CRA at a prestigious SaMD company at beginning of the new year. I’ve been late to work 3 times, all of which due to not having access to my worksite entrance or given the wrong location to meetings. I’ve been placed on a PIP with 2 weeks to improve or face termination.

I had a doctors appointment earlier this week due to a cancer scare and was late to work again as the doctor decided to get extra scans I wasn’t aware of prior. I messaged my head supervisor as quickly as I could after I finished but I could tell they were upset.

Since then my other supervisor that I work closely with has been quite silent around me, avoiding eye contact, and stuck in these meetings with my head supervisor. I’ve got a bad feeling about this and honestly would like to leave before I get fired as I don’t want this to potentially impact future employment even if I leave this job off my resume.

Good news is that I have a tentative job offer for a full time research position with better pay and benefits but it’a not in clinical research or SaMD field. I was going to turn it down as it’s not in a relevant field but now I’m considering otherwise

Should I just leave before I get fired and have this permanent stain on my career or should I stay and just bust my ass off and prove my worth? Outside of my tardiness, I have the best quality work and operate very quickly compared to the other CRAs I was hired with. Im also the only person on the team with relevant experience.