I don't have a solution for you, but I just wanted to note that this is happening to me too. Before iOS 16 my Mac and my iPhone were in perfect harmony with iMessage. Instantly after upgrading to iOS16 they stop being in sync completely. I signed out of iCloud on both devices, restarted, etc and then they finally started syncing again.
However. now I have your exact problem. I can delete an iMessage or SMS on my iPhone and it'll delete on Messages on my Macbook. But deleting from the Macbook keeps the message on my iPhone.
Interestingly enough. I have had an unsolvable issue with my Apple Watch not deleting SMS messages when they have been deleted from my iPhone. This has gone on for years with other people reporting it too, and I just decided to give up on it.
It is so hard to find a solution to this, since searching for anything similar in Google just gives you results for people not properly being logged into iCloud etc.
It is not viable to keep signing out of iCloud on the Mac in the hope that it'll finally work, because each time you sign back in you have to download GB's of your Desktop and Documents.