Although the registration country's laws do indeed generally apply on aircraft, that is in addition to what I said, not instead of it. Nationality laws can grant or withhold citizenship worldwide regardless of location and regardless of whichever other laws apply for most purposes.
For example, as an American who lived in the US for more than my first 30 years of life, any (biological) kid I have anywhere in the world will be a US citizen by birth, regardless of location, based solely on US law, even though outside the US I'm generally subject to the host country's laws and not to US laws. (Nationality laws are not the only US laws to have extraterritorial application, but the default rule is for US laws to apply domestically only.)
As an inverse example, the denial of US citizenship by birth to people born in the US to two diplomatically immune parents is solely due to US law, not due to any international agreement, even though the diplomatic parents are mostly immune to US law and subject to at least a large fraction of their home country's law.
Here's a general Wikipedia summary of how birth aboard aircraft and ships works for purposes of nationality, including specific comments on Canada and the US, as well as addressing the two international conventions that people often think are relevant to this question but aren't: https://en.wikipedia.org/wiki/Birth_aboard_aircraft_and_ship...