An unwanted path with a microcontroller off
Except for the 5 V-tolerant ones, the MCU I/O pins have an internal protection circuit. This consists of a diode between the I/O pin and 3V3 (A on I/O, K on 3V3) and another diode between the I/O pin and GND (A on GND, K on I/O). The idea is that voltages above something like 3.7 V cause the upper diode to conduct and dissipate the energy into the 3V3 rail, while voltage below about -0.4 V cause the lower diode to conduct and dissipate the energy to GND. It protects the IC against transients and other limited-energy pulses and this circuit is common in logic ICs.







simulate this circuit &ndash; Schematic created using CircuitLab

In your case, the microcontroller is unpowered but the USB-UART IC is driving a microcontroller I/O with its RXD output voltage. This voltage is high when RXD is idle, which for your UART is probably far more often than not at the moment. So RXD drives the microcontroller's 3V3 rail through the upper diode of its RB5 pin. This puts your microcontroller 3V3 to a mid-rail voltage well below operating level and drawing more current than RXD can supply untroubled. I would venture that it results in the microcontroller semi-functional erroneously driving your LED output weakly high.

If you connect RXD to the microcontroller as shown below, it should have no further problems.

(If I have the USB-UART IC pins named the wrong way around, the above text expects RXD to be the 'USB receives data' pin and therefore that RXD is an output of that IC.)







simulate this circuit