Programmatically opening an inventory from within an InventoryClickEvent listener causes a player interaction (i.e. as if the player right or left clicked without any inventory open). This only seems to happen if you click on an item in the existing inventory rather than an empty slot (i.e. InventoryAction of type PICKUP_*).
Here is a simple piece of code to reproduce the behaviour:
Simply open your usual player inventory. Click on any item you're carrying. A player interaction will be triggered.
Opening inventories like this from within InventoryClickEvents is common amongst plugins that implement their own custom GUI, for example with paginated or multi-layered inventories. As an example, this is causing issues in Advanced Achievements (https://github.com/PyvesB/AdvancedAchievements/issues/783).
Note that this worked fine with all Minecraft versions from 1.15 all the way back to at least 1.7, and only started happening in Spigot 1.16 builds.
Thanks for reading.