When you are trying to place a bed on a grass path block, that block gets replaced by dirt even if the placement is cancelled.
This happens because trying to place the bed triggers a block update (tickAlways) for the grass path and grass path always decays when this happens. other blocks (for example farmland) have a check if they are valid any only decay if this is not the case, but the grass path is missing that check.
Farmland (and other blocks):
public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) { if (!iblockdata.canPlace(worldserver, blockposition)) { fade(iblockdata, worldserver, blockposition); } }
Grass path:
public void tickAlways(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, Random random) {
BlockSoil.fade(iblockdata, worldserver, blockposition);
}
See here for details and the analysis of this bug: https://github.com/PaperMC/Paper/issues/4242
PR: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/750/overview