Seems like Canada can't help canadian children who are being kept as hostages for four years in a foreign country and mother can't get legal help from anyone there. Consulate can't help because there are only two options, full custody or court order which mother can't get outside of Canada... Circle, where children are victims, and one parent take advantage of the other. I wish canadian government could protect children, but they are not in a situation like this
It's true - at least partly. If you don't have custody, there's not much Canada can do.
But the other side of this: Canada has no mechanism to determine who has custody of children who reside abroad. You say the child is held hostage by the other parent - but this assumes that the parent who wants issuance of the passport is 'in the right.' (Seemingly, solely on the basis that this parent wants the child to come to Canada). If the child is a victim, or the one parent taking advantage - you'll have to go to the authorities and courts in that country (usually).
Regardless of your opinion on that: Canada is (usually) bound by international treaties. Amongst which: Canada (and indeed most countries) is basically required to treat the custody decisions of the country in which the child resides as binding. Circumventing that is akin to kidnapping. (We may not like it but otherwise it would basically mean that the non-custodial parent can abscond with a kid to a different country and nothing can be done)
Or the briefest form of all: Canada cannot fix all countries, everywhere - especially personal and family problems.
All this said: get legal help. There are some areas where the international treaties provide some framework to do things that can help. Perhaps some of those will work, but more important is the domestic legal framework.