Wither skeleton pathfinding is different if there is direct sky access. I believe this happens because despite them not burning they are still reluctant to enter sunlight as they are undead.
A video showcasing the bug: https://youtu.be/gjUZ-p0A7ak
Linked issues
Attachments
Comments

Thank you for your report!
We're tracking this issue in MC-101136, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
Please provide a screenshot of your game with the F3 debug screen enabled.