Cell address shift when copying from template

A formula, =IF(F23="L", Q23*(I23+J23), Q23*(J23-I23)) when copied from a template to a daily spreadsheet often becomes =IF(F23="L", Q23*(I23+J24), Q23*(J23-I24)) when applied to two consecutive rows. Single-row calculations are accurate but when calculating paired rows, both target spreadsheet rows may exhibit cell renumbering as shown above. The last calculated cell is currently =IF(F53381="L", Q53381*(I53381+J53381),Q53381*(J53381-I53381))
What must be done to prevent cell renumbering ?

A small sample would be helpful.

Is the template open in LibreOffice when copying?

Pasted into two rows? Dragged down?

Please click Help > About LibreOffice, in the resulting window, click the icon in the middle just after Version information and paste in your question or a new comment.
Possibly, this might be a fix, First steps to take before submitting a bug - The Document Foundation Wiki(OpenCL)