Problem with 3D objects rendering in front of closer objects.

So I have a problem where game objects that are closer to the camera, render behind objects which are further away. I am currently doing a card game, and in this game I decided to make the text on the cards into Text Meshes. This works fine as long as the text is decently close to the rest. The problem is though that as soon as the text isn’t really far away the render process sometimes makes mistakes and renders the text behind the card:

This is how it looks when it looks correct!

Here I moved the camera slightly to the right and suddenly the text gets rendered beneath the card plane.

Is there any way to fix this?

Actually, in the days it took for this question to get accepted I finally found the answer myself, it was a fault of the shader.
I used: Legacy → Transparent → Diffuse
I changed that to: Legacy → Transparent → Cutout → Diffuse and that fixed the problem entirely.