Issue with power button when opening laptop

My apologies if this has been answered elsewhere. My searches didn’t turn up anything.

My 12th gen laptop, 12th gen intel core, running Windows 11.

Intermittently, when I open my laptop, the power button doesn’t illuminate (even at full charge, and the battery otherwise is working fine). I find I have to open and close the screen a few times before it will illuminate. Sometimes I can see it illuminate as I begin to open the laptop and then go dark and unresponsive when the screen swings open.

I suspect a hardware issue, but that’s well outside my expertise. I’d greatly appreciate any help!

[EDIT: when I’m connected to my external monitor, that monitor will remain active while the laptop is closed, but if I open the laptop, the power button will (intermittently, but increasingly often) flash on and then go off, leaving the external monitor blank. Once I close the laptop (or get it to activate successfully) the external screen works again.]