The President isnt his enemy. His real enemies attack him relentlessly, and they will celebrate his decision to quit.
Barr was confirmed 54-45 with 3 Dems voting for him-Manchin, Jones and Sinema- and one Rep against him, Rand Paul. The Dems never wanted him as AG from the very beginning.