In my European legacy airline, there does not have to be a pilot on the flightdeck while fueling.
However, there must be contact between the purser and fueler via portophone.
In (rare) cases the plane is being fueled and boarded without cockpit crew onboard (but with that mentioned portophone contact).