By default, the unplugged alert will only trigger when it is activated and the charger is unplugged while the screen is locked.
If you do not have a screen lock set (in system Settings > Security > Screen lock) or simply want the unplugged alert to always trigger any time the charger is unplugged, then you can go to the app Settings and switch off Only if screen locked under the Unplugged settings section.