A. Check your app lock settings by going to Settings > Privacy and Security > Passcode Lock. Ensure that the 'Auto-Lock' feature is set to a short duration. This will help the app lock more quickly after you exit the app.
B. If the app lock is still not functioning as expected, try reinstalling the app. Before doing this, back up your chats to avoid losing any important messages.