You have two problems here: one, hacking a two way switch where you ought to have a three way switch, and two, using a ground as a current carrying conductor. You should put back the original three way switch immediately to be safe, and come up with a plan B.
Resolving the first problem is simple: buy a smart switch made to replace a three way switch.
Resolving the ground wire issue is a little more difficult. Your smart switch requires a neutral, but the box it's going in doesn't have a neutral. (At least not that I can see in the photo.) This is common when switches were wired with a switch loop, which is what it looks like you have here.
You have used a ground wire in place of a neutral. Using a ground wire in place of the neutral works, but it isn't safe. The ground wire should only conduct current in the event of a ground fault. So you shouldn't have bootlegged the neutral, it's a code violation and a safety issue.
To rectify this, you could bring a neutral to the box by rewiring, that may be a small job, may be a big job, but it will work with just about any smart switch.
You could also choose a different smart switch. There are smart switches that work without a neutral. Most of these actually bootleg the neutral internally. This seems like a terrible idea, but UL will only list a switch that bootlegs the neutral if it is tested and only passes a very small amount of current on the neutral - small enough that it isn't a safety issue. So if a UL listed switch does it, it doesn't count as bootlegging.
Just make sure the switch is UL listed, and stick to a reputable brand - there are tons of products on the market from sketchy brands that are putting the UL logo on products that are not really UL listed.