Hi Jan. I had a similar noise on my old V20, which had a similar design to your S40. In my case, the culprit was the clamp bolt that connects the boom to the steering column. Others have commented on this particular spot too, over the years. Some have solved it by checking/correcting the torque they've put on the bolt. Others have pulled the bolt out, cleaned it, and lightly lubricated the threads and the outer sleeve. I solved my creak by sliding very thin mylar washers between the inside of the boom clamp and the steerer tube top cap, where the bolt slides through. Most of the bolts on these bikes only need about 5nm of torque, but the boom clamp bolt needs more. The spec for my V20C is 10nm for that bolt. I would imagine that the S40 would be about the same.
Another area to check are the two clamps that connect the bottom bracket end of the boom to the chainstays. Those should be about 5nm all around, with even gaps at all four bolts.
I hope this helps.