Using Blueprints, if a widget was created inside the CharacterBP and the character is then destroyed - an error will occur.
The widget would have to be created elsewhere, in an asset that does not get destroyed.
I’m not a c++ guy, but I hope this may shed some light on what may be happening.
Where is the widget being created ??