Partial blocks of any kind disable all commenting
Comment.php uses the User::isBlocked
function, which does not account for partial blocks and is deprecated since MediaWiki 1.34.
Tested on MCW-en. A partial block against the "Minecraft Dungeons" namespace, and a block against editing the "Cat" article both had my bot see the "can't post comments" error when looking at profiles.
I don't believe it's appropriate to disable commenting for any partial blocks, though I do believe the ability to selectively block commenting and not editing should be implemented.
Edit: I am aware this is very unlikely to change given UCP work. However, please keep this issue in mind as UCP feedback. Specifically, that partial blocks are a valid (if underused) means of preventing harm to wikis, and custom tech on wikis should properly account for this feature.
Edit2: I'm not sure whether the ability to partial-block editing in the "UserProfile:" NS counts as an implementation of the selective comment block suggestion