If established medical opinion and prosecutors both think it's gonna be iffy, that's a pretty good sign that it's gonna be iffy. Without being privy to the details of the reports, to any particular psychiatric expertise, or to any particular understanding of the French criminal code, that's all there is to go on - both sets of experts thought this was gonna be very iffy to prosecute as murder.
Now, prosecutors aren't generally in the business of not pursuing murder cases if they think they have a decent case, so one would think their decision here to go for medical confinement is a fairly carefully considered one based on the evidence and law.