With which command do you delete items lying around?
/ kill @e [type = item]
Don't know if this also applies to Java but it works in Bedrock.
/ kill @e [type = Item]
Without the spaces in the brackets.
Which space?
That after "type" and that after the "=".
type = item
it should be called.
As far as I know it works with. So with me in Bedrock it works.
So Bedrock ignores the spaces. Then I wonder if Java is ignoring them too. Test it right away.
If so, sorry for the wrong objection ^^
I also said that I don't know whether it also applies to Java.