This is usually a thorny question, and the answer can be equally complex. While these leaves are job-protected, the reality is that yes, an employer can let an employee go under some circumstances. Generally speaking, you can let someone go while they are on leave, but you cannot let them go because they are on leave.
The reality for employers is that business needs may change over time, especially if an employee is on a lengthy leave. If a department closes, or a business shuts down entirely, the employer is not expected to jump through proverbial hoops just to keep an employee. The bottom line for employers is that if they are going to dismiss an employee while they are on leave, they will want to have a solid business case for doing so.
Otherwise, employees are likely to pursue a civil or human rights claim, alleging that any decision about their termination was made on account of their protected absence. If, for example, a new mother was the only person on a large team let go, the employee would be able to make a solid case that the decision to terminate was connected to their job-protected leave.