I serviced the motor about a year ago and didn’t notice anything alarming inside. One of the bearings was a bit dirty and rusty, but I managed to clean and lubricate it, and the noise doesn’t quite sound like a bad bearing.
I can only hear it on alternating pedal pushes. If I just jump on one pedal, there's no sound, but if I shift my weight from one side to the other, it appears. I'm starting to suspect it might be coming from the motor mounts - maybe there's some flex and it's rubbing against the frame - but I'm not sure, and I don’t really know what to do about it either. Sometimes the noise disappears entirely, while other times it gets exceptionally loud.
All I know for certain is that it's not the pedals or the cranks. I cleaned the mounting surfaces and bolts with acetone, but that didn’t help. Then I tried the opposite and greased them, but that didn’t make a difference either. At this point, I really don’t know what to try next. I’d rather fix it myself than take it to a bike shop.
The bike is GZR Black Raw and the motor is Bafang M400
Creaks can be tricky on any bike but I'd work my way from cheap to expensive which it sounds like you're already doing.
Since you've done these then it's tike for a bit more in depth work. The next two I usually do simultaneously:
If this doesn't sort it then it's likely internal: bearings, etc. some of these are sometimes user serviceable and they're the typical culrprits, but worst case it's bike shop time...
Edit! Just a quick post-script to this now I've had a few coffees - often I've had experiences where motor bolts are just a little under torque, so it's always worth a quick nip up to spec before you start taking stuff out!