I struggled with that one; thanks for linking your code; I’ll have a look and see the trick I missed.
The key is you didn’t need to keep track of the strings, just the counts.
I have a writeup of my 2021 solutions at https://programsareproofs.com/articles/aoc_2021.html. I got day 23 down to 31ms using Rust.
My 2021 day 23 runs in 5 milliseconds for both parts using A* with a custom heuristic: https://github.com/orlp/aoc2021/blob/master/src/bin/day23.rs
https://github.com/forrestthewoods/aoc2021/blob/master/rust/...