Custom lingering potions and tipped arrows display a much shorter duration than they actually apply, matching the reduction in duration that a normal potion would receive (1/4 for lingering potions and 1/8 for tipped arrows). For example, the command below will give a custom potion that says it lasts for 2 seconds, but applies an effect lasting 8 seconds. An equivalent command for a tipped arrow will give a tipped arrow that says it lasts for 1 second but lasts for 8.
/give @s lingering_potion{CustomPotionEffects:[{Id:1,Amplifier:6,Duration:160}]}
This is a duplicate of MC-98310.