I see that this has become a common issue, and one that I also experienced with my Dell XPS 13 2-in-1. My laptop would beep randomly (seemingly from somewhere in the keyboard) from the first day I received it in the mail, and it eventually began beeping three to four times per day.
When I finally sent it to Dell for repair it had come to the point where the laptop was completely unusable and began emitting a horrible electronic noise that did not stop until the battery was empty. Dell replaced the motherboard and hard drive, this fixed the issue.
If you are having this loud beep problem my suggestion is to send your XPS 13 2-in-1 into Dell, and have them run diagnostics on the motherboard/hard drive.