What is the secret then and how is the first problem solved? The solution is "blind signatures".
Very simplified: The algorithm works in 2 stages:
1. each user transmits to the coordinator the input from which he will send Bitcoin and some evidence that allows the coordinator to clearly verify that the output transmitted at the second stage belongs to one of the users participating in the mix round.
2. Each user transmits their output address to the coordinator, but with a different identity - a different IP address. The coordinator, using the certificate obtained at the first stage, makes sure that the output address belongs to one of the participants in the mix, but does not know who.
The key, basic point here is that at the first and second stages different user identities are used, i.e. different IP addresses. Otherwise, all of this makes absolutely no sense.
Those. Let's say a user uses a VPN with an output address of 1.1.1.1. From this IP address it transmits its inputs to the coordinator. Then it connects from the same IP address and transmits its outputs to the coordinator.
It is clear that the coordinator will, without any problems, link and record where the transaction came from and to whom it belongs.
In order for the coordinator to be unable to link user inputs and outputs, the IP address must be 100% different in the first and second stages.
How is this resolved? Very simply: using a VPN does not solve this problem. the coordinator will always be able to connect your inputs and outputs by VPN IP address. When using Tor, it is possible to form identity (chains of nodes) and route the necessary connections along one chain or another. Thus, you can use one identity at the first stage and another at the second stage.
In order to manage chains, tor software provides a special interface.
Even with the different IP I guess the first problem still exits. The coordinator knows who belong the output address because there must be a link between input and output address so that coordinator can identify where to send the coins. Please correct me if I am wrong.