Fixed: on selection the text is copied, so it is impossible to replace the text with what is in clipboard as the content of clipboard is already replaced by old text.
https://emacs.stackexchange.com/questions/74298/setq-select-enable-primary-t-breaks-copy-paste-in-emacs-28
--- a/.emacs-my Wed Oct 12 00:14:04 2022 +0300
+++ b/.emacs-my Thu Oct 27 14:18:09 2022 +0300
@@ -1001,7 +1001,8 @@
(set-face-attribute 'region nil :background "light blue"))
(setq select-enable-clipboard t)
-(setq select-enable-primary t)
+(unless (eq window-system 'w32)
+ (setq select-enable-primary t))
(setq save-interprogram-paste-before-kill nil)
(when (fboundp 'er/expand-region)