dW = F * dr
in this equation why is the derivative of distance r taken and not of the force?
Because the equation is answering the question: how much work is done by force F(x) in moving an object from x=r to x=r+dr.
This equation is a definition. We define work that way because it is useful for us, specifically, it leads to the work/energy theorem.
But in a case where F changes as r changes shouldn't there be dF. For example shouldn't there be dF in gravitational potential energy derivation?
I'm wondering about the context - i.e. why presume the relation was arrived at by taking the derivative of work with distance? One could start with the work and take the derivative with force as suggested, and still keep the same definition. Perhaps there has been a lesson that presented the relation as coming from the derivative?
Please reread post #2 - that answers your question.
In the specific example of gravity, how much work is done by gravity when it moves an object from r to r+dr?
Separate names with a comma.