Both Keith Richards and HST were perpetually under the influence, so not surprised at the similarity. Of course, Depp never played KR in a movie.
Richards has been clean, at least from drugs, for years. Probably decades. Thompson never cleaned up and it showed in his writing.
Depp played Jack Sparrow "as Keith Richards." Even when filming this wasn't a secret and then he said so repeatedly in interviews in order to lure Richards into the sequel.