How can I secure a table that is hanging off the wall via four screws (2 on each side) from slipping away?
The 4 screws you installed will hold the desktop to those metal supports. The screws should be long enough to pentetrate at least 3/4 in.
The real issue is how are you mounting/attaching the support to the wall.  The metal support should be mounted on the wall first at the height you want snd leveled.  You need to located where the studs are behind the drywall.  Studs are normally 16&quot; on center. So find the two studs, 48 in. apart.  Use 5/16- 2 1/2&quot; long lag bolts to screw the support to the wall.  After the support are installed, place desktop on support and rescrew the desktop to the support.  Odds are that you will have to s crew in at new holes.  Not the one you are using now.