FamilyType.ByGeometry / FamilyType.VoidByGeometry not working in 2022

@Elie.Trad thanks for your reply. Unfortunately Transaction strat/end does not work. I am using this version:
image