If you remove your Samsung Galaxy Note 4 "S Pen" from the device, then the S Pen commands are automatically opened. They are mostly not required, so you close the commands again. If it bothers you that the commands are automatically opened after removing the Samsung Galaxy Note 4 S Pen, then you can turn off this feature as follows.
Open on your Samsung Galaxy Note 4 the following submenu:
Menu --> Settings -> Section "Device" --> S Pen --> removal options --> "Remove pen"
The following actions are available for selection.
• None
• Aktionsmemo
• S Pen commands
To disable the S Pen commands when removing the pin from the Samsung Galaxy Note 4, set the mark to "None". Finished!
Now, if you take out the pen, no S Pen menu will appear on the display of the Samsung Galaxy Note 4.