Masked Blend Mode Shows Ambient Occlusion from Behind Object

Hi I've been trying to create a shader with an opacity mask similar to the standard shader "Cutout" rendering mode, but it appears to be incompatible with screen-space ambient occlusion. Here is a comparison of the Standard Shader and Amplify:
Standard Shader:

Amplify Shader:

Nodes:

The other option I've tried is using a custom blend mode with Opaque and Transparent or AlphaTest but that causes AO to go around the entire object's quad which is almost worse.
Standard Shader:

Amplify Shader:

Nodes:

The other option I've tried is using a custom blend mode with Opaque and Transparent or AlphaTest but that causes AO to go around the entire object's quad which is almost worse.