I think you must either relocate the panel, or somehow create walls that put it outside the new bathroom, or tell the owner that a bathroom cannot be built in that location. Whatever leniency might sometimes be available by virtue of a "grandfather rule" will not be available in this case. Yesterday, there were no overcurrent devices in a bathroom. Tomorrow, there will be. This creates a new violation, rather than accepting an old one.