Using hole deletion in strings causes bugs.
1)

2) Clicking delete here leaves just the declaration

3) if you try to click "=" or add a new string function such as ".join" it will break

Make hole deletion for string functions delete the variable declaration as well