The Sox put him on waivers, and the Cubs claimed him. With the new rules in effect, no trades of major leaguers can occur after 7/31. To clear salary, a team can put a player on waivers, and if they're claimed, the claiming club assumes their contract.
The Angels did the same thing in 2023, when they traded for Giolito and Lopez before the TDL, then after falling precipitously out of the running for a wild card spot, waived both Giolito and Lopez. Cleveland claimed both and assumed their salaries.