You will find that the game's auto-targeting system selects a target and stubbonly sticks to it. To change the target hold the attack button and move your left stick to make a cone appear in front of your character. When this happens you wil be able to redirect your attacks to any enemy inside that cone.
The glitch can be used to get infinite gold as well. Go to the storage guy. Have the items you want to duplicate in your inventory. Then save. Now talk to the storage guy and put the items you want duplicated in the transfer area! Now fully exit out of the storage window. Will not work if you don't exit out of the storage window first. Then hit the home button on your switch and close out of the game. Now when you load your game back up you will have your items still in your inventory and the same items in the transfer area.</p>