Very very late update but I found another way to get the state of the HMD. “GetVrfocus state” unfortunately didn’t work for me in UE 4.24.
I found the Node “Get HMDWorn State” which returns an enumeration that you can use to check if its being worn or not.
I hope this helps some people who are still looking for an answer