How to move only outside annotations in a timeline?

I am creating a timeline plot with python. I want to show text in the boxes of the timeline, but the problem is that the text is sometimes too long for the boxes.

The annotations are placed with textposition=โ€œautoโ€.

fig.update_traces(textposition="auto", insidetextanchor="middle")

Unfortunately, the boxes are partially hiding the outside text now:

So, my question is whether I can move the text of the outside annotations downwards, so that they are below the bars. I found that the โ€œupdate_annotationโ€ function can work also on a subset, but unfortunately I did not find any example on how to do that.

Can anyone help me or indicate where an answer to this question is already given? Thank you all in advance.