Galaxy assembly bias and large-scale distribution: a comparison between IllustrisTNG and a semi-analytic model