I think it's a bit of everything.
So, the knee pain wasn't caused by cycling.
When I was on my racing bike (after a year of not using it) it actually hurt my knees. I assumed it was the force I applied to the pedals going up steep hills.
I assumed the ebike helped as it 'flattens the hills'.
But yes. It could well be position too. The mtb has a bigger frame..
After 2 rides that constant annoying pain was just gone.
Had x-rays and apparently no loss of cartilage. So no official diagnosis. But remedy is always 'physio' which has been very hit and miss.
Genuinely thought that was my life, constant knee pain and eventually replacement, but this has at least put that off for (hopefully) a long time
So this bike is as close to a miracle as you can get. For me anyway.
Below is a pic of my miracle bike
My mate has the same bike and hes followed me down some strong red routes and a couple blacks; his gripe is the seat post doesnt really go much lower than that without having to chop it, which means he can't upgrade to a dropper post. He's also had to replace a few parts as they've took a battering in the samll time he's had it following me down routes he probably shouldn't be doing
His knee problems have gone too but I think that was more down to riding a medium frame before. E-Bikes will help as they reduce the force on your knees whilst keeping them moving. I used to have bad knees when I overstressed them until I rode more and more and now I don't get bad knees at all even on big rides (non-ebike user).
I also have Glucosamine and Chondroitin 500mg/400mg High Strength Complex from amazon that I forget to take and only really used/remembered when I got a flare up, which relived it within a day or two