Hey @KarenShmukler!
Based on your question, I am assuming that the assessment you had set up was a Canvas Assignment with a submission type of Text Entry an Until date and time set up as a part of the Assign to fields.
In my experience, If there is an Until date set on a text entry assignment, the students need to submit before the time expires. If they attempt to submit after the time expires, the student will be locked out of the assignment and the text entered will not be saved.
One somewhat backwards fix for this issue is if a student is working and time has expired, the student can copy and paste the text into another document for safe keeping until the instructor opens up the assignment again, if they wish to do so.
If this does not describe what your set up was, please reply with additional details and some specifics of what the assessment was and how the time limit was set.