Whilst removing various panels and clips to replace a 1299 screen i found this rubber piece on the floor ,any ideas?.
That looks like it should be inside some plastic which then pushes onto a thin flat piece of metal to secure it, which may or may not be part of your bike
there are grommets, theres a few, from folding the battery cover in place to some of the panels where they slide in and catch they are very easy to dislodge, i use a bit of lube to help is go together and avoid pushing them out
this is close, if not the very part, and Ducati have used this in various locations on many bikes including yours. https://www.motorcyclespareparts.eu/en/ducati-parts/76411411b