To accurately measure unique counts in large datasets, a significant amount of memory is required, which can also impact performance. GA4 uses the HyperLogLog++ (HLL++) algorithm to estimate frequently used metrics such as Active Users and Sessions. Since this is an approximation algorithm, there are limitations in obtaining exact figures. Google's tech team states that due to the HLL logic, a difference of approximately 2% can occur between the sum of individual segments and the total value.
Reference: Unique count approximation in Google Analytics | Google for Developers