Mounted Combatant does not work in this case
This is a very clever idea. Unfortunately, the negative synergy of the cover rules and of the Mounted Combatant feat prevents it from being useful.
The typical case where Mounted Combatant is useful is when you are mounted on a steed, and people try to cut down the steed to cut down your mobility. By forcing the attacks to be made against you, you are protecting your steed from harm.
However, when you are behind total cover from the enemy, the rules for total cover come into play:
A target with total cover can't be targeted directly by an attack or a spell, although some spells can reach such a target by including it in an area of effect. A target has total cover if it is completely concealed by an obstacle.
So, we come into a contradiction between two rules: Mounted Combatant allows you to force the attack on you instead of your mount, but total cover disallows the attack on you entirely. Which one wins?
The answer is Specific vs General. While you can generally force the attacker to target you instead of your mount, this does not work when the attacker specifically has total cover against you. This is because their total cover prevents them from attacking you at all.
Bonus: Ways they can escape, aside from killing the Giant Frog
There are other ways small creatures can escape, aside from trying to kill the Giant Frog. Here is an incomplete list, which may help you anticipate some of these when you use this build idea in your game.
Find Familiar's vision swap (Action) + Misty Step (Bonus Action)
Clairvoyance (Round 1 Action) + Misty Step (Round 2 Bonus Action)
Enlarge/Reduce or Wildshape: The small creature can Enlarge itself or Reduce the Giant Frog. Either way, the Frog may have to spit out the swallowed creature. This is not necessarily what happens, depending on the DM. But as the Giant Frog can only swallow small creatures in the first place, it makes sense that if that swallowed target grew in size while swallowed, the Frog has to spit it out.
High level escape spells: Freedom of Movement, Dimension Door, Teleportation, Plane Shift, Etherealness
Gaseous Form: the creature can pass through pin-hole sized openings while in this form.
Stinking Cloud: on a failed Con save, a target inside the area spends its turn "retching and reeling" -- as in, vomiting.
Pushing Attack: On a hit, the Giant Frog must succeed a Strength save or be pushed back 15 ft away from you. The exact thing that happens here is DM-dependent, though, as it's easy to imagine a DM who will disallow this on the basis of reality (you can't push someone away from you if you are inside them, after all).