I was on my horse (online free roam with LGKDS) and all you need to do is stand still. The bear was attacking from the side and I guess if you're on your horse, that is the first target. Don't move at all and just swing your knife. You'll kill the bear in 1-2 hits if I recall correctly..
I've tried chasing after it when it was distracted and no matter how much I know I hit the bear with the knife, nothing happened until he turned around to kill me.