Why don’t you secure the top from the bottom side of the bar ? Bore some holes partway through the 2 x4 supports so the screws you need won’t be so long.
A 2 x4 is about 3.5 ” wide plus 0.75″ for the top thickness = 4.25 ” . If you bore a hole 1.75″ into the 2×4 ,a 2″ wood screw will leave about 0.5″ of space till the screw would would pierce the surface of the top. Just be carefull not to tighten too much and do this.
You could always use wood glue if you were not worried about taking the bar apart ever. Just my thoughts. Others may have other ideas also.