Use dm_get_active_iname that should be used on all places. This function return integrioty device name if it shoudl be maintained by LUKS2 context directly. Code must not touch other devices that it does not own.