I have just tried your macro, and there is indeed something going wrong (the macro itself seems perfect ;) )..
It would appear that when using the function "Split Loop" (whether via a macro or directly), when there is a CC# event at the Right Locator, that CC# event is deemed to be after the Right Locator. (in other words.. not your fault at all.. I'd even go so far as to say.. a bug! ;) ).
So, I have managed to concoct something that will advance the pedal off data by one tick, so that the last one remains inside the range before splitting (and, hopefully, any other pedal off events..which will also get advanced by one tick, unfortunately, shouldn't make any appreciable difference to the rest of the performance**). You need to create a Logical Editor Preset (NB.. Logical Editor, not Project Logical Editor ;) ), then add that Preset to your macro, immediately after the line "Transport - Locators to Selection".
[Important] Also, make sure that in Preferences>Editing>MIDI, that "Split MIDI Controllers" is not checkmarked.
Here's the Logical Editor Preset..
Function = "Transform".
Save the Logical Editor Preset, with an easily recognisable name, e.g. "Advance Pedal Off",
then edit your macro so that after the line "Transport - Locators to Selection", you insert "Process Logical Preset - Advance Pedal Off", followed by the remainder of your existing macro.
Anyways, it's a bug, and not your fault ;).
I didn't think it would be worth the extra effort to try to isolate just that last pedal off event, but you might want to try having a go at that, one evening when the TV is lousy ;).