How to avoid accruing illegal stay on B2 visa extension?

My mom and dad came to the USA to visit me in December 2019 on B2 (tourist) visa. Even though they had their return tickets booked for April 2020, they got their i94 for 6 months, till June 2020. However, they were unable to leave as planned in April 2020 due to countries closing their borders because of the global corona virus pandemic. We filed for their extension online by submitting an i539 application in May 2020. They travelled back to their home country in September 2020 once it was relatively safe to travel. Their i539 application is still pending decision. I got to know recently that if people leave the US while their i539 application is in process, they abandon their application and USCIS will reject the same.

  1. If USCIS rejects their extension application, will their stay from June 2020 (i94 expiry) till September 2020 (date of leaving the US) be considered illegal? Will it affect their future travel in anyway?

  2. If we withdraw their application now, will their stay from June 2020 (i94 expiry) till September 2020 (date of leaving the US) be considered illegal? Will it affect their future travel in anyway?

How do we avoid any problems in the future?

Who said they will abandon it and then rejected ? Do you have an official source link for it ?
In general, that is applicable only for COS where they abandon the COS, if you travel out.

  1. You did the right thing by filing and left on time. Carry all documentation, your parents are fine. Your parents were in period of authorized stay. Read Period of Authorized Stay vs Legal Status vs out of Status

  2. Some of these things are not clear. It is grey area. You can leave it that way or just inform that your parents left on so and so date stating the reason and leave it up to USCIS to make the call.

Make sure your parents carry all documentation that you applied on time when leaving what you submitted and flight tickets, Print US travel history Online. It will be fine, nothing to panic or worry.