Queen Elizabeth was "absolutely determined to do her duty" just days before she died, former Prime Minister Liz Truss has recalled.