Very simple: there needs to be sufficient available bandwidth in the network.
If an access switch’s uplink supports the total, worst-case bandwidth of all workloads across it, then there’s no packet loss. Plan 5-10% extra to make up for jitter and bursts and you’re on the safe side.
In practice, Ethernet’s 10x speed steps make it rather easy to select the required speed class. Gigabit Ethernet is quite capable of supporting a number of simultaneous streams, and there’s little reason to use slower. If 1G doesn’t cut it use 10G, especially between access and aggregation, or for aggregation to core. If 10G becomes to slow, go for 25G, 40G or 50G depending on what your favorite vendor is offering.