They won't be able to hire you unless you hold a valid residence permit with unrestricted right to live and work in Latvia. And they will ask for it once you apply.
Some unlucky guys were fired without a reason before covid. And yes, some of my colleagus that were ditched amid covid were never called back.