How can I for 1 task, increase the task duration without impacting the efforts (for example the resource will still spend 2 weeks on the task to spend 40 hours)
Try to change the schedule mode in the parameters area. Not sure if one of the three modes supports your scenario..
Issue is that effort is Duration + unit (resource) so if you change one of those the effort will be affected..