Trying to replace slot, need help.

In Minecraft 1.20.4 I have a custom block that can create potions based on the beacons effect, but for some stupid reason it won't replace the potion instead deleting the item: I am trying to just get it to replace the 2nd slot in the hopper (3rd but it has a ID of 2, due to how slots work) with the potion:

I've tried multiple different methods and I can't get it working, it just completely empties the slot and I'm about ready to remove this block:

Please help

#Date: March 28th 2022
#Author: Prism_Skywalker
#Description: Gives you the appropriate potion
##########################################################################################
data modify block ~ ~ ~ Items set value []

#singular_effects_lvl1

execute if block ~ ~-0.5 ~ beacon{primary_effect:"minecraft:speed"} run data merge block ~ ~ ~ {Items:[{Slot:2b,id:"minecraft:potion",Count:1b,tag:{display:{Name:'{"text":"Beacon Infused Potion","color":"aqua","italic":false}'},HideFlags:1,Enchantments:[{id:"minecraft:protection",lvl:1s}],custom_potion_effects:[{id:"minecraft:speed",amplifier:0b,duration:6000,show_particles:1b,show_icon:1b}],CustomPotionColor:1044479}}]}
execute if block ~ ~-0.5 ~ beacon{primary_effect:"minecraft:haste"} run data merge block ~ ~ ~ {Items:[{Slot:2b,id:"minecraft:potion",Count:1b,tag:{display:{Name:'{"text":"Beacon Infused Potion","color":"aqua","italic":false}'},HideFlags:1,Enchantments:[{id:"minecraft:protection",lvl:1s}],custom_potion_effects:[{id:"minecraft:haste",amplifier:0b,duration:6000,show_particles:1b,show_icon:1b}],CustomPotionColor:1044479}}]}

#finish
playsound minecraft:block.beacon.power_select block @a[distance=..16] ~ ~ ~ 1 0.5```
Continue to help post