If you have a itemstack saved in a config deserialized in 1.17 then update to 1.18 a value named "v" changes to "2860" whilst still being "2730" in the config will cause them to not equal eachother even though they are the same exact item.
Config for example
itemstack: v: 2730 (1.18 itemstack are 2860) type: DIAMOND_SWORD meta: ==: ItemMeta meta-type: UNSPECIFIC Damage: 2
player.getInventory().containsAtLeast(configitem, 1) //Will return false if one is a ItemStack from 1.17