That’s a good question.
When you apply from the States it’s by mail and the passport is mailed to you.
When you apply in person in Canada the passport is mailed to you but I have no idea if they accept a foreign address. You could try. Or you could contact them first.