Any function to pinning my plugin on the top

I want to add a button on this plugin, and it can pin the plugin window on the top and consistently focus on the keyboard. How can I do this?