Possibly wrong pseudo element for the last paragraph?

Browser: All
OS: All

Hello, I came across this situation, which is IMHO a bug or at least causes the problems.
In the default CSS there is this CSS, which should remove the bottom margin of the last paragraph of it’s parent:

:where(p:last-of-type) {
    margin-block-end: 0;
}

Shouldn’t we rather use :where(p:last-child) instead of :where(p:last-of-type)? Because otherwise it is triggered even for the situation, when the paragraph isn’t tha last element in the parent, for example, when it is followed by the list.

Here is the screenshot of the example situation:

Could you please consider changing this behaviour?

Thanks
Petr