These endorsements would not have been allowed before JT modified the Canada Elections Act in 2019
I don't think that these would have been illegal before. No change made in 2019 is in regards to these endorsements. How do you want to even make these illegal? Neither Obama, Clinton or Sanders are Canadian citizens, They don't have to follow our laws in the US. They can endorse anyone they want. And Obama and Clinton are currently private citizen. They don't hold a public office.
I don't think that these would have been illegal before. No change made in 2019 is in regards to these endorsements. How do you want to even make these illegal? Neither Obama, Clinton or Sanders are Canadian citizens, They don't have to follow our laws in the US. They can endorse anyone they want. And Obama and Clinton are currently private citizen. They don't hold a public office.