I struggle by myself for years with that. I found finally a workaround. If you set anim mode and anim class by the begin play event with a delay. It set it while runtime and it works. ^^
But this workaround only works when your skeletal mesh component is already added inside the blueprint. If you add it per AddSkeletalMeshComponent Node. It wont work sadly.
For this i only find a workaround to create a sepreate blueprint to set there the anim mode and class directly to the skeletal mesh component and add this blueprint with AddChildActorComponent node than in other blueprints.
Greets