If under some generalized coordinates the force can be written as:
$$Q_j =-\frac{\partial U}{\partial q_j}+\frac{d}{dt}\left(\frac{\partial U}{\partial \dot{q}_j}\right).$$
Then can the force always be written in that form under any other generalized coordinates for that problem?
(If not then the potential about EM force can only apply to $x,y,z$ coordinates or a few other coordinates but not any coordinates.)