Noises on a bike are a tricky kind of thing to diagnose. I can tell you that my Haibike Full FatSix, PW drive, always made a funny noise when I used the lower power levels Eco and Eco+; a "churning" kind of sound that I can only attribute to as being a heavier load placed on the internal drive gears that go away when higher power is applied. Again, describing a noise is a tricky deal as your "scraping" noise could very well be my "churning" noise!
At High Power and Standard Power, that churning noise goes away, replaced by some high pitched whirring noise that really gets blocked out because of the louder whining noise coming from the fat tire's tread blocks. I suppose a camera or microphone down low, like what Court does in his ride videos would better isolate where these noises are coming from. Though I am concerned about the true long term operation of these internal nylon gears inside our motors, right now at 9400 miles, I've been more then happy with the Yamaha drive train. I can't imagine any other brand being better then what I have experienced.
What is worrisome and irritating is reading how you were treated by the seller once you reported your issue. It is in this area of ebiking where I see the ugly side of customer dissatisfaction. And it's not only constrained to the lower end brands. Not from what I've read on these forums.
Yamaha is a multi-billion dollar company. You bought a brand new Yamaha that had some kind of issue within the motor. The warranty should have provided a new motor in kind to replace your motor; which would be sent back to Yamaha, broken down and inspected. Not replaced by some motor off a demo floor model with over 100 miles on it! And at that, it took 8 weeks to address this issue.
The dealer was not being a very good advocate for you, the customer. Or maybe Yamaha Power Assist Bicycles is not being responsive towards their dealers. Either way, somebody dropped the ball on you, the customer.
The big ebike players in the game here in the US, Yamaha, Haibike, Stromer, Trek, etc, need to have some kind of human representation on these forums who can read these posts and maybe react a bit quicker then the 8 weeks it took you to get back on the road again. Maybe then we can find where the disconnect is located after the sale has been made, between customer & selling dealer.
Good luck and keep us informed how the bike goes for you!