Thanking you and Thank you are both correct. Thank you is more common and used to show gratitude for something done. Thanking you is used at the end of a letter/email and means that the gratitude is continuous or for future use.
Thank you is the present simple form of the verb to thank someone.
Thank you for your help.
Thank you for cleaning the window.
As you can see, Thank you is used to show gratitude for a completed task.
Thanking you is often used in a formal context to show that your gratitude is ongoing and continuous.
We use it especially at the end of a letter/email.
Thanking you in advance
Thanking you for your continued diligence.
Thanking you is the present participle and is used in the present continuous verb tense.
Thanking you is becoming more common in spoken English.
Thank you or Thanking you
The difference when you use Thank you or Thanking you depends on the context.