The bug
The maintains_farmland tag was implemented in 23w16a, which contains blocks which should make farmland permanently remain farmland and not stop being farmland randomly if said block exists on top. Among the blocks in this tag are minecraft:pumpkin and minecraft:melon, which imply that these blocks should also cause farmland to stay farmland if these blocks exist on top. However, placing one of these on top of farmland will immediately cause it to revert to dirt.
How to reproduce
Verify that pumpkins and melons are members of this block tag
Attempt to place one of them on top of farmland
Expected results
The farmland would not be reverted to dirt by this placement.
Actual results
It is.
How to fix
Either farmland should not be reverted to dirt if a melon or pumpkin is placed on top of it, or pumpkins and melons should be removed from the maintains_farmland block tag.
Thank you for your report!
We're tracking this issue in MC-262006, 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:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki