This is how it works in Canada and it's absolutely toxic. I have seen Realtors push people up on price when they're the highest bid.
It's certainly the case that the agent who knows that a particular bidder is the highest/most attractive offer is working for the seller.
You can have an agent working on behalf of the buyer, but my experience is that’s a minority rather than majority arrangement.
Dual representation can work out ok in some scenarios, but the hyper-inflated and super competitive market we're in right now isn't one of them.
If you tell "your" agent that you'd like to bid $1M but are able to and would pay up to $1.2M because you really love the house, you're giving away a lot of information that I decided I wasn't willing to give up and so kept all Realtors at arms-length.