Again, unsure of your requirements as you don’t state them, but recursing down to ways returns just the ways (but no relations data)

(
  rel[admin_level=8][designation~"outer_london_borough|inner_london_borough"];
  rel[official_name="City and County of the City of London"];
);
way(r);
out geom;