I would like to offer a point which is contrary to what the canon is here on cycling forums.
My approach is roughly this: not all laws are legitimate, and some laws, even though you're supposed to obey them are clearly illegitimate. When some unelected EU bureaucrats take ebike laws
from Japan (where average rider weight and height of the rider is much less than that of Europeans) and just copy them over as a EU-wide directive without any public consultation, this law has zero legitimacy.
Furthermore, when arbitrary restrictions are made for no reason whatsoever (e.g., no throttle allowed) without any sensible reason given for doing so, again, this is a law that's not legitimate.
It gets even crazier. Did you know that children under 14 aren't allowed to ride on bikes in many countries. Yet many manufacturers make kids' ebikes, I got one, it's normal and children aren't getting into accidents because of these (at least not that I can see).
So, moral of the story is, you need to weigh your risks. Derestrictions are typically disabled using a button press so if anyone checks, you can just switch it back to pedelec mode and nobody can prove anything. I doubt that, in the case of an accident anyone is going to investigate the
internals of your bike. Trust me, the people qualified to do that aren't found in many places, and thinking that insurance/police are even remotely aware of how ebikes even function is silly.
So, long story short, I would not worry about some potential consequences of getting in trouble because the bike is derestricted. What I
would worry about is the objective safety of your child as you are going at 45kph. If you are happy with the rists, put on a child seat and let people assume you're on an ordinary pedelec.