Used it on Trevenant and switched out to another pokemon in battle without it saying anything about unable to switch out. Tested it in a wild battle by using ingrain first and then switching out after it used it. Though ingrain disappears after it switches out.
Ah okies, thank you ^^