I cannot unlock apps to close them in the recent apps screen on my new phone. Pressing the lock icon only open the app.
Not sure if you're still having this issue, but recently suffered the same (different app) and managed to resolve it completely by accident:
Go to the recent apps menu (as shown in image) and simple do a (quick) swipe to the right on the app you want to lock/unlock, starting point doesn't seem to matter much but make sure to swipe all the way to (or over) the edge. If you do it too slow or not far enough it doesn't work.
I haven't been able to find this in any official documentation or if/where it can be configured/disabled, it's not listed in the System->Gestures menu. It also seems to be fairly tenacious since 'locking' an app persists after a reboot or force stop via developer menu's 'running services'. It seems to be something similar to Windows' 'Pin to Taskbar' or Apple's 'Keep in Dock'.
Phone: Alcatel 1S (2019) running Android 9 (build 01001)