Article 40.13 of the Sporting Regulations, states that “if the race ends whilst the safety car is deployed it will enter the pit lane at the end of the last lap and the cars will take the chequered flag as normal without overtaking."
Basically, when the race is still underway then overtaking can be performed after the safetycar line.
BUT, if its the final lap and the race is ending under safety car rules then you can't.
I did think it was a bit harsh and I'm not a schuey fan, but rules are rules....and it took them 3 hours to make that one up!!!