for additional info of link of sales orders with opportunites)
Then you can select the Cancel Order action the SO501000 screen and filter the grid by the Opportunity status = Lost.
I’m not sure this approach (filter by unbound field) works well with schedules though. You can set it up with this condition but I did not manage to make it process any records
You might want to make this field db stored (bound), but then you need to figure out how to update this field on changing the opportunity status (which is workflow-driven field). I believe it is doable.
Let me know if the ‘unbound field approach’ does not work and you need further assistance