Surviving Spouse filing

My spouse passed away in the summer of 2021.  I was able to file as a surviving spouse in 2022.  It's my understanding that that will also be the case in 2023, but not thereafter.  Can you please verify this?