Proton only uses E2EE for the message body (including attachments). The subject and headers are not end-to-end encrypted.
That’s not entirely unreasonable, since they use that data for the search function on the server side. Nobody’s really cracked the nut of E2EE search, though there’s been some interesting research in the field recently.