There was recently a post about a person who got a work permit to work as a live-in caregiver for a family where the child was 15 years old. In that case, the parents were often working late because of the nature of their business. If the 12 year old does not feel comfortable being home alone or the parents do not want him home alone, they are in their full right to get a live-in caregiver.
Your friend needs to make sure that the work permit is for live-in caregiver and not something else because that is the only way to be eligible to apply under the live-in caregiver program. After 2 years of working, your friend can apply for an open work permit and PR but it takes about 15 months right now to get the open work permit and another 16 after that to get PR. Your friend must make sure to follow all the rules. While applying, make sure she lists her common law if she has one and children. Should the job end, I assume the 12 year old will not need a nanny for too many years to come, she can stay in Canada for the duration of her work permit and look for a new live-in caregiver job but she may not start working until she gets her new work permit.