There are two basic ways a design can be protected - either with a patent, or with a trademark. Patents however only offer protection for a limited time (in the US somewhere between 14 and 20 years, depending on type and when it was issued), so even if the Stratocaster or Les Paul designs were patented in the 50s, those patents would have long since expired.
On the other hand, the purpose of a trademark protection is not really to prevent others from using the same design, but from trying to deceive consumers into thinking their product is really yours. You can trademark names, logos and even shapes, however a competitor can still make similar products, as long as they are not identical to the original in a way that would be confusing to the consumers.
Gibson sued PRS over the similarity of the Singlecut to the Les Paul (Gibson has trademarked the Les Paul shape and design in the 80s), and eventually lost on appeal, as Gibson themselves admitted that "there’s no question when they buy this, you’d have to be an idiot not to know which guitar you’re buying."
Also, it is more difficult to trademark parts of the design that can be argued to be functional as opposed to aesthetic. For example, clearly functional elements like having 3 pickups on the guitar in a particular arrangement, or having 6 tuners in a row can not be trademarked. However, you could easily trademark a distinctive shape of the headstock (and most guitar manufacturers do this), as that is purely an aesthetic element.
With the shape of the guitar body, the differences between functional and aesthetic are often blurred. Some manufacturers have been able to protect their body shapes with trademarks (e.g. Gibson or Rickenbacker) Fender tried to trademark the strat and tele bodies in the 2000s, but failed, partly because by that time, there have been numerous legal clones on the market for nearly 50 years, and Fender could no longer argue that those shapes were unique to them.