the last thing an airline wants to do is off-load and then re-load baggage for customs clearance at an intermediate point. It is a simple matter to identify international baggage for clearance at a final destination. Indeed, even connecting baggage avoids "first point of entry" clearance in some countries.
On a GRU GIG flight which had originated in EZE, the BsAs passengers bound for Rio remained on board at GRU. On arrival at GIG, we domestic passengers first had to line up with the EZE passengers for immigration, but then a well-oiled

and oddly casual system filtering out the domestics began. This was a GOL flight.
I do not know what happens in GRU with RG. But on an RG EZE service through GIG and SSA to REC, our bags were definitely
not cleared at GIG. That was two months' ago.