You can try; the plane is already made and exported, and for certain customers (eg. the US Navy) they're going to struggle to find anything that replaces it.
The best way to invest "against" the F-35 is to put money in companies like Embraer and Saab, which have put up a strong fight on the export market.