You can add {force: true} with type:
cy.xpath('//*[@id="mat-input-0"]').type('Rest',{force: true})
It looks to me like an animation problem. Try adding a visibility check
cy.xpath('//*[@id="mat-input-0"]')
.should('be.visible')
.type('Rest')