They don't necessarily mean the same. In 2. she might not have actually hit him. The knife might not have made contact, but equally, it might have. In sentence 1. there is no doubt - the knife struck him.
Note that we normally don't use "hit someone with a knife". You can stab, strike, attack ... someone with a knife. Note also that 'stab' implies contact and penetration of skin, 'strike' implies at least come contact, and 'attack' doesn't necessarily imply contact.
Student or Learner