Error while saving snapshot: (persistence_id, sequence_number) already exists

Hi, folks , I am getting the below error sometimes:
Detail: Key (persistence_id, sequence_number)=(MEMBERSHIP-d8ec1971-f095-43d2-a69f-39772463fd90, 43) already exists.

I am using postgres as database with classic actors

I found the below issues on github, but could not find a fix in those issues:
SnapShot Issue
Journal issue

I am not getting issue while saving into journal, it is only the snapshots which are not getting saved intermittently. Sometimes they get saved after throwing the above error , sometimes they are not saved. This can be problematic as some entries in the journal gets replayed, which is not desirable.
In this
Comment
Please, help me out.

Thanks.