Cross-reference in hyperlink

Hello, I have got in Writer this text: “…You can see it in source code 1…”.
Number “1” is cross-reference on caption below long source code example. I have created bookmark on the first line of the source code. I insert hyperlink to the created bookmark to this part of the text “source code 1” .

The problem is when I click somewhere on "source code " page is redirected to the top of the source code, but when I click on number “1”, page is redirected on the caption below source code and user have to scroll it up, also I have same situation after export to PDF.

Is there any possibility how to disable cross-reference links during PDF export and after click on number “1” be also redirected on the top of the source code?

EDIT: added example files (see yellow highlighted text)
pdf: Dropbox - test.pdf - Simplify your life
odt: Dropbox - test.odt - Simplify your life

I would try to place the bookmark just before the source code and not in the first line.

Thank you for response, but probably my problem is hard to imagine from text description, so I added examples.