You leave and enter the country with its passport, if you have it. So on your UK trip from France you leave France with your French passport, enter and leave the UK with your UK passport and return to France with the French one.
Edited to say I’m shtoopid and didn’t see @JaneJones had already answered the question more succinctly!