From my take on the code, the culprit may be the tripwire's render type compositing "output state" set as "weather target", compared to the typical block translucent render type which is "translucent target". Testing this change did resolve tripwire appearance.
When experimenting with this myself I found that this issue is a manifestation of MC-9591
If you relog after placing the lily pads but before placing the sponge you will find all lily pads still there will always be removed when the sponge as is placed.
The issue is not caused by the user missing tags, it is not adding a 's' if the tag is a short, a 'b' if the tag is a byte, a 'L' if the tag is a long, a 'f' if the tag is a float and a 'd' if the tag is a double, so test for a chest with stone in the first slot you could do:
/testforblock ~ ~+1 ~ chest 0 {Items:[0:{Slot:0b,id:1s,Damage:0s,Count:1b}]}
For clarification it may be good to point out this started in 1.21.5 when that data fix was first put in place, not only in 1.21.8