Could it be a limitation in thickness? Laptop display assemblies are thin, which means you need a very small lens and as a result probably can only fit a very small sensor. There's a lot more room for camera modules in phones.
That’s my guess as well. If you look at ifixit’s iPhone 11 tear down, the selfie camera takes up almost the full thickness of the phone[1]. The lid of the MacBook is much thinner. People are mentioning the front facing cameras of the surface are better, but they have much more depth to work with. I’m still disappointed the camera res hasn’t improved for almost a decade now, but I suspect you’re right in that the thinness of the lid is the limiting factor.