From the IRS Publication 550:
Option not exercised. If you have a loss because you did not exercise an option to buy or sell, you are considered to have sold or traded the option on the date it expired.
Pretty much the same rule if you have stock and a company goes bankrupt.
“Considered to have” is not the same as “did”.