This has actually been happening to me in both Bedrock and Java versions, single player and on servers and realms. Creepers will, at random times, in random places, spawn in extremely well lit rooms with no way in or out, as well as in broad daylight outdoors, and within just a couple of blocks right in front of my face. As far as I was aware, creepers (like many hostile mobs) will not spawn within x amount of blocks of the player, as well as not when the light is over a certain level. A handful of months back is was also witnessed in action during one of my livestreams. I probably should have reported this sooner, but assumed someone already had. I couldn't find a thread for it though, except for one concerning Bugrock from back in 2018. I'm only posting it as a Java issue specifically since the most recent occurrences (latest was about 15 minutes ago) were on Java edition. It's happened off and on since 1.12 though, so it's not just in 1.17 which was the only option given.
Please attach a screenshot of this occurring while the F3 debug screen is enabled.
This issue is being temporarily closed as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki