I'm facing a problem. In the Nether, I spawned a Wither that I can't defeat despite Enchanted Armor, Bow, Crossbow, Gold Apples, and Potions, as well as Totem of Immortality. He always flies over me and shoots me off. Besides, he always makes a hole from which I can just escape. I have tried it twice, but always had to escape through the portal to the upper world. Does anyone know a way or trick how to kill the Wither in my situation? Of course, there are other means to tense him in a cave and shoot him out of a tunnel, but now he's already spawned.
Do you want to legitimately defeat him or are you looking for a command to erase him?
I want to defeat him myself. Charts are unfortunately disabled in my world
Then build an Iron Golem that will help you fight. Diamond armor complete with protection IV and diamond sword with a spell magic. As a ranged weapon a bow with full strength.
Have I already tried in Creativ, which blows you back in a hole and shoots all from above
In creative mode you are invincible.
You can also activate cheats later with NBTExplorer or via the 'Open for LAN' trick (but if you can switch to creative, should they be on - or have you recreated the situation as a test in another world?)
You probably will not get away without cheating.
For the next time: go to height 10, dig a very long corridor (2 high, 1 wide) and spawn the Wither at the end of the corridor. If he then tries to attack you, he will not hit you and you can always go back a little bit in the corridor and hit him.