MV Elemental Damage Rates VS Yanfly Absorption Barrier "soak through" damage

My game includes two elements that interact with the barrier system:

Element 1: Deals 1.5 damage vs barriers, 1.0 damage vs hp
Element 2: Deals 0.5 damage vs barriers, 1.0 damage vs hp

I could implement this by using note tags from Yanfly Element Core & by using Buffs & States core (I already have a passive state for "has barrier" set up) but my concern is that this will result in a couple edge cases:

Edge Case 1: Target has 1 barrier point left, and is hit with a normally-10-damage Element 1 attack (1.5x multiplier). This would result in losing 1 barrier point and 14 hit points, instead of losing 1 barrier point and 9 hitpoints as intended.

Edge Case 2: Target has 1 barrier point left, and is hit with a normally-20-damage Element 2 attack (0.5x multiplier). This would result in losing 1 barrier point and 9 hitpoints, instead of losing 1 barrier point and 19 hitpoints as intended.

How can I account for the elemental multipliers on damage that "soaks through" barriers to HP?
How can I account for the elemental multipliers on damage that "soaks through" barriers to HP?
How did you make elemental multipliers that apply to barriers in the first place? The answer would be in there.

The built-in method to make some skills particularly effective against barriers is to give them a percentage of penetration.

Original thread: https://forums.rpgmakerweb.com/threads/elemental-damage-rates-vs-yanfly-absorption-barrier-soak-through-damage.152716/