I've made this pen holder that allows a slight movement in the Z-axis direction with minimal translation in X and Y. It's the same part printed twice and installed on the mounting plate using M5 screws. There is space for a small bolt and nut to be inserted in the front side, to fix the pen. The maximum pen diameter that can be inserted is 12.5 mm.
It needs to be printed flat so it's stronger in flexion!
I hope it could be useful.