When I say "Sorry for bothering you" that means I'm still bothering you .
But if it has just finished at the time of speaking but lasted for a long time shall I say: "Sorry to have bothered you." or "Sorry because I have been bothering you."?
After you have finished bothering someone you can say
Sorry to have bothered you
since it proper and in the past tense. You can also still say
Sorry for bothering you
P1: Would you know what time it is?
P2: 10:15
P1: Thank you, sorry for bothering you.
which will sound more informal.
Sorry because I have been bothering you
would not usually be used since it is too wordy and Sorry...bother already states the reason (because) you bothered them
Sorry for being a bother
can be used in an informal, self-deprecating way