Some PCs can keep selected USB ports powered after shutdown, but support depends on the hardware, firmware settings and power state.
Some PCs can continue powering a selected USB port after shutdown through a feature variously called USB standby power, Always On USB or PowerShare. A USB port that charges a phone while Windows is running does not necessarily support charging after the computer is turned off.
Port markings such as a battery or lightning-bolt icon can provide a clue, but the system or motherboard manual is the most reliable way to identify the supported port and power states. Depending on the hardware, charging may work during sleep, hibernation, full shutdown or only some of those states.
On supported Windows PCs, the relevant option may be found in the BIOS or UEFI under menus such as Advanced, Power or Chipset. Settings including ErP or Deep Sleep can disable USB power after shutdown; on select ASUS NUC PCs, enabling ErP Ready disables standby USB power during shutdown or hibernation.
A practical test with a reliable cable can confirm the behavior of a specific machine. Laptops may additionally require an AC adapter or stop charging external devices after reaching a battery-reserve threshold. Standby power allows charging but not data transfers while the operating system is off.