I don't think you can guarantee it
If you try to make people mimic how their signature 'should' be, you'll open a lot of cases where people struggle with their device and can't get it to look the same. It reminds me of every time I receive a parcel, and they make me sign that I received it. Even with a pen my signature ends up looking like a 3-year old tried to counterfeit my signature.
Generally you will use other ways of verifying if someone is who they claim to be, other than signature. Is it truly a requirement that the signatures match? It can be mighty difficult to implement that, since people can have their signature change over time AND a finger drawing on a screen isn't exactly the most accurate.
When it comes to digital signing, there's usually a few steps that precede the process.
- Login to a safe environment using login credentials, with or without 2-factor authentication.
- Identify using an ID-card, passport or driving license
The signing itself comes after that. As far as I'm aware, most tools that handle digital signing don't actually match the signatures. What happens is that a manual check is/can be done by the company receiving the signed document. You rely on the preceding steps to ensure that the person signing is allowed to.
If all you want is to encourage people to make it look similar, just tell them with a help text, but don't punish them if it's looking a bit shoddy.