Race cars can be refueled while the engine is running. I assume this is a dangerous task done by highly specialised technicians.
If ground support is not available, an airliner may keep the APU running to be able to provide power to restart the engines.
If ground support is not available and refuel is needed, can an airliner refuel while the APU is running (technically and legally)?
If the question is too broad, it can be narrowed to best sellers (B737 and A320 families).