Even Bing chat or ChatGPT couldn't help me find the title of the movie

Oke, so I will try to explain as much as possible, because it was a long time ago. It’s a crime/mystery movie and I believe it is probably 20+ years old. I remember there is murder case and the main character is a guy who is trying to solve it. There is a woman and they fall in love and she is somehow connected with the murder case (I think she is actually the wife of the guy who was murdered). The movie ends with her ending up in a mental institution and only then you realize that he is actually the main culprit and all what happened was done by him.
As I said, I watched that movie a long time ago, when I was a kid so my memory is slowly fading away. What I also remember is that there is a painting and I believe somehow those paintings are signed with a thumbprint. Those paintings are expensive… Also I believe that guy is a detective and that’s the reason why you are not suspecting him…
Also, I can’t recall if the movie is noire or in color. Also I can’t be sure if the movie is in English or it’s from another speaking region (I’m not a native English speaker)
I have asked ChatGPT to narrow down the search, but none of the titles suggested wasn’t the movie I was looking for.
Any hints?
Thanks!

Is it Shutter Island?