Isnt the desire for giving up the desires, a desire? It looks like a loop. We know desires cause us suffering, however the desire to abandon desire looks like a desire too, right?

I'm sure there is a trick, something to explain why it is different, so... who can help?
Isnt the desire for giving up the desires, a desire?

Yes, it is. A wholesome one that ends when you reach the 'park':


  ...
  "If that's so, Master Ananda, then it's an endless path, and not one
  with an end, for it's impossible that one could abandon desire by
  means of desire."
  
  "In that case, brahman, let me question you on this matter. Answer as
  you see fit. What do you think: Didn't you first have desire,
  thinking, 'I'll go to the park,' and then when you reached the park,
  wasn't that particular desire allayed?"
  
  "Yes, sir."
  
  "Didn't you first have persistence, thinking, 'I'll go to the park,'
  and then when you reached the park, wasn't that particular persistence
  allayed?"
  
  "Yes, sir."
  
  "Didn't you first have the intent, thinking, 'I'll go to the park,'
  and then when you reached the park, wasn't that particular intent
  allayed?"
  
  "Yes, sir."
  
  "Didn't you first have [an act of] discrimination, thinking, 'I'll go
  to the park,' and then when you reached the park, wasn't that
  particular act of discrimination allayed?"
  
  "Yes, sir."
  
  "So it is with an arahant whose mental effluents are ended, who has
  reached fulfillment, done the task, laid down the burden, attained the
  true goal, totally destroyed the fetter of becoming, and who is
  released through right gnosis. Whatever desire he first had for the
  attainment of arahantship, on attaining arahantship that particular
  desire is allayed. Whatever persistence he first had for the
  attainment of arahantship, on attaining arahantship that particular
  persistence is allayed. Whatever intent he first had for the
  attainment of arahantship, on attaining arahantship that particular
  intent is allayed. Whatever discrimination he first had for the
  attainment of arahantship, on attaining arahantship that particular
  discrimination is allayed. So what do you think, brahman? Is this an
  endless path, or one with an end?"
  
  "You're right, Master Ananda. This is a path with an end, and not an
  endless one."
  ...
  -SN 51.15, To Unnabha the Brahman


You might also want to read AN 4.159 which also touches on this theme and is an interesting read.