Which cable connection will result in a greater loss of power?
The losses are proportional to the current flowing in the wire, due to wire resistance.
Let's assume the load draws 5W, which will be 1A at 5V. Even if we assume that the power supply is ideal, and converts mains to 5W with 100% efficiency, it will draw only 5W.
Now as mains is 230VAC in your example, 5W is only 22mA. So because the current is so much smaller, there is less voltage drop over the wire. There is still enough voltage for the power supply to generate stable 5V locally.