The Bug
If you have 3 or more levels of the same potion effect applied at the same time, when the duration of the highest level runs out, a lower level will be remembered - but when the duration of that lower level runs out, it will not remember the levels below it.
To Reproduce
Run the following commands very quickly one after the next. (Using a chain of command blocks helps to run them quickly.)
/effect give @p jump_boost 20
/effect give @p jump_boost 15 1
/effect give @p jump_boost 10 2
/effect give @p jump_boost 5 3
Open your inventory and watch the duration count down. When “Jump Boost IV” runs out, there will be 5 seconds of “Jump Boost III” left - but when “Jump Boost III” runs out, it doesn’t give you “Jump Boost II”.
Additional Notes
Comments

Just tested it in 1.15.2-pre2 and was unable to reproduce.
Does this issue occur in the latest version? (1.15.2 pre 2)