I didn't really like any of those penalties, but I'm not 100% on the rules here. It seems pretty divisive too - Buxton and Collins had a hard split on opinion after the race.
In the end, Perez was too aggressive too early and Lando was in a position to force him off in a manner I've seen on multiple occasions without penalty. LeClerc did similarly, though the first time elicited a more flagrant response from Perez.