They are six-inch high rails called scuppers that are located around most of the carrier’s deck edge. However since space on a flight deck is very limited, oftentimes part of an aircraft and/or its stores will necessarily hang over the deck edge when parked, as seen in the below photo. Any higher railing would interfere with this.
Furthermore as Barry Hampe correctly explains, there is really no need for railings since aircraft are tied down by multiple chains to the flight deck, or under close control while moving. And if an aircraft decides to go over and off the deck, a railing would not stop it in most cases. The scuppers are more for smaller equipment or flight deck personnel, along with nets on the carrier’s side to catch someone blown overboard.



Flight deck edge scupper and nets. The metal chute between the nets is actually for jettisoning ordnance overboard.
Raju's Resource Hub