Having tried a few gradient removal programs, however I never felt that they were right on the ball and that includes PixInsight DBE and Gradient Xterminator etc.
While browsing the web I chanced upon this procedure which I can highly recommend for removing complex gradients in mono or colour.
http://www.flemingastrophotography.com/gradients.html
I've attached a recent effort of capturing the Leo triplette with my 5"apo while the moon was right next to the object at about 75% illumination.
After flat and bias removal etc there is still a horrendous gradient from light pollution from the neighbours lights and the moon (second image). Using the above procedure I was able to remove all traces to my satissfaction and recover an acceptable image.
Worth a try in my opinion and I hope this is of value to others.
Allan