Difference between disabling the plugin from Jira and Atlassian SDK

I have tried 2 methods of disabling the plugin:




Both of them are not disabling the plugin as the disable button of Jira Manage add-ons. Plugin is still working when disabling from SDK, even if it looks as disabled, but in Jira it disables correctly.

Is there a proper way of disabling the plugin?