States are mounting legal opposition as the Trump administration agrees to nearly $4 billion in payments for firms to abandon offshore wind leases, often in exchange for fossil fuel investments.