Patching drywall between two corners
Since you want to have the drywall piece be 5" high I think you will want to have backer behind it for its full height. Consider making it 5.5" high and then using a piece of 2x6  lumber (that comes 5.5 inches wide) as the backer piece. Cut a couple of pieces to straddle across the bottom of this opening at the back and middle to hold up the shelf the full length. To install the front backer piece pre-drill clearance holes through the 2x6 that let your screws slide in place. Then use screws about 3" long to secure through the existing drywall at the corners. This will end up surprisingly strong! See picture below.



The trick to get the 2x6 to screw in place would be to start two screws from each end on each side (eight screws total) and tighten them down evenly and gradually. Make sure to stagger the pre-drilled holes from side to side of the 2x6 on each end so that the screws do not collide with each other as they enter the existing corner studs.