A federal judge has dismissed most of the claims in a sexual harassment lawsuit that actress Blake Lively filed against her co-star Justin Baldoni.