After some testing I managed to get this to work as intended; all I had to do was add a 0.01 second delay node between the clear and set keyboard focus node. I think there may be an issue with the execution order or something along those lines here, but for now this is a ‘temporary’ fix.