Let's talk about what's important. A non-motor axle is 9mm or 10mm. A geared hub-motor will have a 12mm axle with two milled flats to make it 10mm wide. The big direct drive motors have 14mm axles with two flats milled to 10mm.
When you put the motor axle in the drop-outs, you'll see that the centre of it is about 2.5mm lower than it was before, partly because the axle is a larger diameter and partly because the shape at the top doesn't match the drop-out. That's not necessarily a problem in itself, but will be a problem if you have dimpled (lawyers lips) drop-outs because the washer on the outside won't fit in the dimple anymore, and when you screw up the nut tight, it'll break the front off the drop-out. You must make sure that no part of the nut or washer touches the edge of the dimple. It's no problem if you have flat drop-outs.
There are three solutions to that problem.
1. File the washer until it fits.
2. Use proprietary ebike "C" washers
3. Re-profile the top of the drop-out by filing/dremmeling to let the axle further in until the centre is back where it was before.
Some forks with QR axles have drop-outs narrower than 10mm, so they need to be filed a bit wider to let the motor in.
As said above, you need to think about anti-rotation (torque resistance). For low powered motors, and forks with meaty or steel drop-outs, you can use anti-rotation washers that have a tab on them, but you need to make sure that the tab is actually in the drop-out and doing something. If you have a medium or high power motor and aluminium drop-outs or the drop-outs don't have much meat around them, at least one torque arm is mandatory.