Hello, I can across a bug that isn't supposed to happen. When you give yourself a custom potion of harming or healing (a level that is greater than 2), the potion effect works completely fine. However, if you give yourself a custom arrow of harming or healing (a level that is greater than 2), the potion effect does not work and acts completely as a normal arrow.
I checked older versions of this bug up to 1.13.2 which have the same results. I haven't checked anything older than 1.13.