Hey there, milica210.
After reviewing your post, we understand that your iPhone 8 Plus updated to iOS 14.2 and since then, your iPhone will prompt you for your passcode after it has bee charging during the night and it disconnects from Wi-Fi. To begin, you can see if a restart might help: Restart your iPhone It may seem like a simple step but can help ensure your device and its features are working properly.
To confirm, does it randomly disconnect from Wi-Fi during the day or when you pick up your iPhone in the morning?
Also, there are other instances when you may need to use a passcode versus Touch ID. Check out the information below from the following article: If Touch ID isn't working on your iPhone or iPad
You might need to enter your passcode or Apple ID instead of using Touch ID in these situations:
- You just restarted your device
- Your fingerprint isn't recognised five times in a row
- You haven't unlocked your device in over 48 hours
- You just enrolled or deleted fingerprints
- You're trying to open Touch ID & Passcode in the Settings menu
- You used Emergency SOS."
Would any of those reasons be relevant when you are prompted for a passcode?
Take care!