1

If you have any joins try to remove them and check if the issue is observed. And, for your kind info, the issue is a known limitation and it is resolved in the upcoming Pro update, ArcGIS Pro 2.7


1

string_to_array(aggregate(@layer, aggregate:='concatenate', expression:=to_string("id"), filter:=is_selected(), concatenator:=','), delimiter:=',')


Only top voted, non community-wiki answers of a minimum length are eligible