No moves from Pokemon GO are retained. None.
The moves it'll learn are based on a few factors
1. The level it is at when transferred
2. Game/Generation nonsense (closest to time of HOME/SWSH)
Here's a few exampls:
1. Kantonian Ponyta
Will use moveset of LGPE
2. Galarian Ponyta
Will use moveset of SWSH
3. Quagsire (your example)
Will use moveset of SWSH (since the species is available in SWSH)
4. Darkrai (Lv 20, RAM dump from HOME)
As you can see, it's gen 7 moveset
So this is my guess for how it goes, in terms of priority:
If exists in LGPE, use LGPE Moveset.
Else, if exists in SWSH, use SWSH moveset.
Else, use Gen 7 moveset.
Do note that early transfers of Alt forms of Kantonian Pokemon may have incorrect movesets,
and HOME did a dirty fix, where it just corrects incorrect moves by giving other moves it can learn.
(which in itself may have caused issues; it'll have TR move as a replacement, even tho the TR learned flag isn't checked)