Oh sorry, by grass, I meant tall grass (the ones that drop seeds sometimes when broken). Sorry if that caused confusion.
I was in survival mode. Other tools like swords, bows, pickaxes, etc. do not lose durability when hit against grass. It might be a quirk of tridents, but it seems unintended because of how other tools behave.
There may be a solid block on top of the chest, did you check for that?