How to get rid of ._ and ._. extensions while copying to my external harddrive??

I've been having this issue that whenever I copy files to my external harddrive, it sometimes creates certain 'ghost files' (as I like to call them) with an ._ or ._. extension BEFORE the filename.

--> For example, for every xxx.jpg I copy to my external harddrive, it will also create an empty 4kb file with the same filename, but starting with ._
So that extra created ghost file looks like ._xxx.jpg
Also, it regularly also creates one empty ._.DS_Store file during copy in each of the copied folders.
------------

Is there any way to get rid of this problem??
I'd like to keep my external harddrive free of unwanted ghost files.
It would be great if I could prevent the system from making these ghost files, or at least directly delete all these ghost files when the copying is done.

Does anyone else have this problem, and is there any fix?
.DS_Store files are created by Finder to keep track of window size, etc.. It's perfectly safe to delete them after copying.
I see, but is there a way to make sure Finder doesn't create these files to begin with?
Go to Terminal and enter this command: dot_clean -v /Volumes/MyExtHDD

Replace MyExtHDD with the actual name of your external drive. This will merge all the "AppleDouble" (._) files with its native files. Eject your external drive right after that.
Ok, but this probably needs to be done after EACH backup?

Original thread: https://forums.imore.com/threads/how-to-get-rid-of-_-and-_-extensions-while-copying-to-my-external-harddrive.344432/