Now I know that the explanation of the bids in GIB is unreliable in many cases. Here the 3♥ bid is described as 4+♥; 5+♠ and 12-22 total points which suggests to me that it doesn't show extras in any sense of the word. Since a raise of hearts shows four (according to the explanation when you hover over the bid), the only bid that South can make that fits with what is expected is 3NT.
At this point, GIB goes off the rails and bids 4♠ instead of the obvious 4♥.