iOS 14.2 - No text notification when message is open but screen is off
This is a common bug that started early in iOS 14.2 beta and was never resolved for public release.
The workaround is always going back to the list of conversations before closing the Messages app, as you’ve already found.
The beta release iOS 14.3 RC 2 reportedly resolves the issue, so hopefully the issue will be resolved in the public release of iOS 14.3.