A US District Court Judge has dismissed X's lawsuit against advertisers it claimed illegally boycotted its social media platform.