Currently convertToCapped is not running in case of sharded cluster in timeseries_agg_out.js.
The support has never been implemented simply because sharded collection cannot be capped.
With the introduction of unsplittable collections, and after SERVER-86360 convertToCapped can run on tracked unsharded collection within a sharded cluster.
The check should be removed.