[web] Fix "invariant violation" for encrypted uploads
Summary: Fixes ENG-3947. Details are in the Linear issue.
Test Plan: Sent encrypted message on web before it fully uploaded to server. Ensured there was no error in dev tools console.
Reviewers: ashoat
Reviewed By: ashoat
Subscribers: tomek, atul
Differential Revision: https://phab.comm.dev/D8026