It depends where the ace disc winds up in the basket. A leaner on the ground is touching the pin. An ace disc may not be, therefore the leaner is truly "Closer to the Pin".
But, usually, an ace is considered as close as you can get, and cannot be tied (or beaten) by a disc that did not ace.
That is absurd. If someone won a CTP because their disc was on the ground touching the pole while my disc was an ACE that ended up in the basket but not touching the pole, I would scream bloody murder.