There’s a diode from the USB power to the Arduino’s internal 5V rail, so you’ll get a slightly lower supply voltage and max signal level than if you use the correct voltages on the other supply pins, but the circuit should still work.
See here for a bit more on the voltage drops you can expect on the different supply inputs: