The short answer is:
I do not think this is a realistic plan, and it would probably be a big mistake to try.
I'm sorry, I know that's not what you want to hear.
Longer answer:
I've been to Sardinia (loved it, it may be my favorite place I've ever been). I have not been to Corsica yet, but will be going in September 2024, and have been planning that trip in great detail for months, so I have a pretty good (and current) knowledge of what's possible in terms of getting to/from Corsica.
I suggest you change how you are thinking about going to "Corsica" and getting back from there: "Corsica" is not a single place, it's a large island (not as big as Sardinia, but big enough to matter). You don't fly from "Corsica", of course you would (in theory) fly from a city/airport in Corsica. There are four of those with commercial air service, but all of them are very limited. None are particularly big. Three of the four airports do not have any flight that will help you get to anywhere in Italy (unless you want to make a couple stops in France on the way and spend a fortune).
One airport actually could get you to Rome: Bastia (BIA). Bastia has the most air service. But even that is quite limited - just 2 flights a week. You actually could try to do this from Bastia, but only if a single flight on a Monday or a Thursday would work for you. And then there's a geographical inconvenience...Bastia is near the northern end of Corsica - the opposite end where you would get off that convenient-looking ferry from Sardinia.
You would be coming from Sardinia (in theory). Yes, there is a ferry from the northern end of Sardinia (Santa Teresa Gallura) to the southern tip of Corsica (Bonifacio). But Bonifacio is a long way from the airport you would need. Will you have a way to get from the ferry port in Bonifacio to the airport in Bastia? (For that matter, where exactly in Sardinia are you planning to be? Will you have a way to get to the ferry port in Santa Teresa Gallura?). The distances involved here are not insurmountable, but they are not close-by, and there are few good and simple options for accessing these places - especially on a trip that's already way too short.
I consider (and sometimes successfully complete) some crazy, thread-the-needle itineraries (and I've got some of those built in to my trip to Corsica next September). But what you are proposing here (hop over to Corsica and fly to Rome from there) is not something I would try. I would urge you to reconsider your plans, as I do not think a quickie 2-day taste of Corsica will work at all, and even if you can pull it off (I'm skeptical anyone could), I think trying to do so would be a mistake. Because...
I have not followed your previous posts, don't know anything about your plans other than what's posted above in this thread. But...you are planning just 6-7 nights in Sardinia. That is far too-short a trip to this destination. I spent almost 3 weeks there and we only scratched the surface, felt like I really wished we had had more time there. There is a lot to see and do in Sardinia. If you slice off a couple days to blow through a corner of Corsica, you would be further short-changing yourself by cutting into what's already way too little time there, IMHO.
Having loved Sardinia myself, I would suggest you skip the idea of hopping to Corsica (or the idea of adding a couple days in Florence or Tuscany, too). Either of those plans will just further shorten your time in Sardinia, which would be a crime to me.
I'm sorry, I know this is not what you hoped to hear, but I do not think your proposed itineraries are realistic or wise. If (as it sounds) you have a flight home booked from Rome, then get yourself to Rome the day before your flight, spend the last night there and make sure you don't miss your flight home.
I hope this is useful in making your choices. Good luck.