Hide issue types from Sub task creation

In one of our projects we want to hide 2 Issue Types when creating a Sub Task.

We have multiple Parent Issue Types, all of which you can create a Sub Task.

We have multiple Sub Tasks and want to only show some of them (we cant delete the subtasks as they have been used historically)

Example:

Parent is a Task. When I select Create Sub Task I have to select the Issue type.

Issue Types might be subtask one, subtask two, subtask three, subtask four and so on.

I need to hide subtask two and subtask three.

I found a behaviour script to hide issue types but that only applies to parent tasks. Does anyone have example that I could try to use?