does it work if you try
DECLARE @ids NVARCHAR(max)
select @ids = string_agg(inserted.[lo_location], ',')
from (select X.query('.').value('(row/lo_Location)[1]', 'int') as lo_location
--, X.query('.').value('(row/lo_Location_Code)[1]', 'nvarchar(100)') as lo_location_Code
from @inserted.nodes('inserted/row') as T (X)
) as inserted