A federal judge says Blake Lively can recover some legal costs from Justin Baldoni but not punitive damages and other relief she sought after settling her legal claims over their 2024 film “It Ends With Us.”