After replacing my screen, the machine no longer sleeps when I close the lid. Yes, I checked pmset. It seems like the lid angle sensor needs to be recalibrated (my replacement screen did not include a lid angle sensor). The official Apple guide says that I need to perform System Configuration after replacing the screen (https://support.apple.com/en-us/108333), but I am not able to follow the steps there after step 7 - instead it asks me something about an offline session.
For now at least I have a working screen which is good.