There are multiple mentions on the net of the basilica being closed to general tourism during papal masses, such as this one on the "Around Rome" tour company's website:
"The Basilica is subject to last minute closures for religious ceremonies. When this occurs, we are happy to offer customers an extended tour of the Vatican Museums. While we undertake to tell tour groups ahead of time if there are any planned disruptions to Basilica opening hours, this is not always possible and in these cases we are unable to provide refunds or discounts."
And this comment from on a "Though Eternity" tour review:
"Unfortunately we never did get into St Peters as there was a special mass being said that day by the Pope."
On Trip Advisor:
"...because of the papal mass and we didn't get into St Peter's at all. "
And Pontifical North American College:
"If there is a Papal Mass being held on Sunday morning, pilgrims will not be able to enter without a ticket. No other Mass will be held during the Papal Mass."
Given the above, I'm sure that the basilica will be closed before, during and for a time after the service. Security around the Pope being what it is plus the need for a heightened atmosphere of decorum/crowd control during a special mass would indicate that tourists won't be allowed to just wander about.