If the two boats are on opposite tacks, then port/stbd rules apply. The confusion arises when a boat is running downwind and encounters another beating and they are both on the same tack. In that case it's a windward/leeward encounter where the windward boat must keep clear, putting the onus on the running vessel to avoid the other.
Often the boat that rounds first, sets the kite and heads downcourse encounters still-beating boats. If on starboard, they will often hail the oncoming boat not initially realizing that they are also on starboard. Then they belatedly realize that they are the burdened vessel. Hopefully not too belatedly, especially in a breeze.
If you are on the boat still beating, it's important to know your rights and advise the other boat early on. Also there is a real danger of snapping upright in the other boat's lee and contacting their spinnaker if the crossing is too close. So when you're hailed "starboard" be ready to reply "leeward" loudly if it's appropriate.