Higher level chapter overrides lower chapter field

I am using chapter numbering. I have my top level paragraph style “Week X”. I then have a second level paragraph style “Lesson Y” In the footer I have fields for both the numbering of “Week X” and the name of “Lesson Y”
So if my lesson name is “banana” and it is the third week “apple”.

Week 3 apple banana

Should appear in the footer;
The thing is that if (and only if) a “Week X” occurs after “Lesson Y” in the text, my field for the name of “Lesson Y” becomes the name for “Week X” so I get
Week 3 apple apple

Is this a bug? Or am I doing something wrong?

Edit (don’t answer) to describe precisely the characteristics of your fields, notably the level limit.

When you experience such glitch, is there on the same page any “Lesson Z” after the “Week X” causing the phenomenon? If there is none, LO Writer uses the most recent higher level heading (see my answer in this question).

If, as you said LO Writer uses the most recent higher level heading name, is there a way to accomplish what I am trying to do?

I need more information on the structure of your document. If it is not confidential, attach it to your question. Eventually, remove sensitive data or “lorem ipsum” it (type “lorem” without quotes and F3).