Try this, setup the GameInstance reference on Event Construct (the root of your widget) and define a variable for this GameInstance (like in my screenshot above). Use the same Get Game Instance, where target is not a widget. I suppose you are trying above code inside a widget and attempt to call the GameInstance from there.
Inside your function you use this GameInstance reference.