When using the locate command to find structures near the world border, it may locate structures outside the border. There is nothing beyond the border, so if you locate a structure there, it can be troublesome for players who really need it. You should add a restriction that locating structures must be within the world border.
Thank you for your report!
We're tracking this issue in MC-126611, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as working as intended, which means this is not considered a bug and won't be fixed. Please do not leave a comment on the linked ticket.
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:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki