Well, the most natural thing would be for the new agreement with Mexico to work the same way as the existing agreement with Canada. According to Just Security:
The U.S.-Canada agreement requires each country to return an asylum seeker to the other country for her/his claim to be adjudicated if the person was “physically present [in the other country] immediately prior to making a refugee status claim.”
I.e. people who travel through Mexico to make an asylum claim in the US will be deported to Mexico to make their asylum claims there (to Mexico). If the Mexican claim is denied, then that person would legally be able to make a claim in the US. Of course, that person would somehow have to get back to the US to make that claim.
The quoted matter conflates refugee and asylum. In plain English, an asylum seeker is often just a particular kind of refugee (there may be other reasons to claim asylum than refugee status). But legally the two are different processes in the US.
As I understand the process, if people go through a Safe country (e.g. Canada) to reach the US and then make asylum claims, they would be deported back to the first Safe country through which they traveled. They could then make their asylum claims there. For those asylum claims that fail, they would be deported back to their original country (refoulement is no longer an issue as the claim was denied; they aren't refugees legally). If the asylum claim succeeds, they would be subject to the normal processes of the Safe country.
If those people whose claims fail can then get back to the US, they could make asylum claims in the US even if they go through the Safe country again. But of course that requires repeating the whole process.
One could argue that rather than going through the Safe country to reach the US and be deported, it would be easier to make the first asylum claim on reaching the Safe country. I believe that is the point of the policy, to encourage people to stop going through countries illegally. This also tends to weed out people who are really migrating for economic reasons, as they may not want to migrate to the Safe country. And successful asylum claims in the Safe country then block asylum claims in the US. The presumption being that many asylum claims are made by economic migrants to do an end run around the US immigration system, which prioritizes asylum claims and family reunification over economic immigration.
They might still be able to make refugee claims, but those rarely allow resettlement in the US. That's presumably why people are skipping them to make asylum claims instead.
All this is dependent on the US signing a Safe agreement with some country through which asylum seekers are passing. Mexico would be preferable. Without the Safe agreement, the US can't deport the asylum seekers. Because then there is no Safe country and the US can't deport to the origin country until the asylum claim is adjudicated.