I can’t fix the bending of the frame, but one thing you can consider is to adjust the limit screws of your RD so that you no longer have access to that last gear cog adjacent to the disc so you won’t accidentally shift onto it. Of course, this means you lose that entire cog, so your 11-spd becomes a 10-spd, but that’s the tradeoff.
Whatever you do, DON’T try and bend the hangar back with a hangar alignment tool with non-replaceable integrated RD hangars like on some Cervelo TT bikes - once that hangar cracks, you are done for and the frame is dead. There is nobody out there that will repair it for <$800 (not including shipping), I’ve asked.
One last idea that I’m sure you won’t like, and not sure would even work, it’s to reinstall a small plastic ‘dork disc’ back onto the cassette to stop the rubbing.
Is the hanger actually bent or is the dropout worn making the hanger pull under when the skewer is tightened?
It is a relatively easy repair to build the dropout back up to original alignment.
Thanks for the help. For now I am not going to risk doing anything. It is such a small amount off it is not worth it. Also for some reason it seems to rub more on the stand than when under load.