I reproduced your material graph and pasted the second code in the custom node.
I checked it multiples times but I can’t get it to work.
Can’t figure out what the problem is.
Do you apply this material to a plane, a cube or a sprite? Does it matter?
Are there important settings you didn’t indicate?
Othewise: no doubt using a shader is the way to achieve this blurring effect but I have no skills to do it.
So I tried to achieve my limited gaussian blur DOF effect in a post process material as a first step.
Quite simple, in fact. Here is the graph, if it can be useful to someone:
And the texture I used as a mask in the material:
And here is what i get in game:


