Which system version do you have installed?
You are hearing the "ping", whenever the focus is lost (the cursor has been moved out of the textfield where you are typing). When the focus is no longer on the text field, the characters you are typing will be interpreted as keyboard shortcuts - for example hitting the spacebar while then no longer enter a blank character but open the Editor. It using the ⌫ key to erase a typo may cause the currently selected photos to be deleted.
It is difficult to avoid this problem, we just have to make sure the pointer is not moved out of the textfield and Photos has enough memory to work with. When Photos starts to beep, I quit and restart Photos. And quit all other apps that I do not need to be open at the same time. That will help for a while.
When I have to type a longer text, I simply write it first into a note and copy and paste the text all at once into the caption field of a photo.