Inconsistent behaviour closing Windows between Windows and all other OSes

Inconsistent behaviour closing Windows between Windows and all other OSes.

Windows:

            case WM_CLOSE:
                if (! component.isCurrentlyBlockedByAnotherModalComponent())
                    handleUserClosingWindow();

                return 0;

macOS:

    bool windowShouldClose()
    {
        if (! isValidPeer (this))
            return YES;

        handleUserClosingWindow();
        return NO;
    }

Linux:

        else if (atom == atoms.protocolList [XWindowSystemUtilities::Atoms::DELETE_WINDOW])
        {
            peer->handleUserClosingWindow();
        }

Why does only Windows refuse to close the window if a modal is open? That check should be up to the user if wanted