Drs recommendation

I'm pregnant with twins and my dr said that he recommend for me to not have sex after 20 weeks 22 weeks at the latest but since I have been pregnant it seem like my sex drive is extremely high right now I am currently 26 weeks and still having sex but me and my partner have found ways to do it that we don't think are harmful to the babies and we cut out a lot of the really fun stuff we used to do do u think it's safe or should I just follow the advice of my dr