The top surface of the insert needs to be the exact same shape as the keycap mold (you can see the curve on both the ones you showed). It also needs something to hold it in place when molding, preferably that it's held firmly between the front surface and back surface of the cap mold, so it's the whole thickness of the cap at at least a couple points, but with enough holes that the resin can flow everywhere. Will probably need more settling time / ultrasonic vibration / stronger vacuum to get rid of the bubbles.
Good attempt, though.