I am getting into Islam but I'm finding it hard to quit masterbation so I am wondering if I can do ghsul right after I finish masterbating. if I can then I think I can become a full Muslim inshallah!
Yes. It is will be accepted inshaAllah. Repent to Allah and make a firm intention not to repeat the sin. Allah says:
Say, "O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allāh. Indeed, Allāh forgives all sins. Indeed, it is He who is the Forgiving, the Merciful." Quran (39:53)