When you timely filed an electronic federal tax extension form and the IRS rejects it, you have five-day calendar days to correct and resubmit that extension for electronic re-transmission to be still considered timely filed by the IRS. This is called the Perfection period.
For example, if you are an 1120-S business tax filer and have timely e-filed the federal tax extension form 7004 to the IRS on March 13th, 2021, two days before the due date (March 15th, 2021), and the IRS rejects it. In that case, you get five calendar days, i.e., March 18, 2021, as a grace period for correcting and retransmitting your federal tax extensions to the IRS even after the filing due date.
Please note that you must file your extensions to the IRS before the due date to get the perfection period. Filing after the due date will end up in rejection and penalties.