Removing a configuration profile on a sudo frozen device?

New Contributor

We have some devices that are locked to Guided Access for a particular app using a configuration profile. However one of them had to be wiped for an unrelated reason and now it is in a constant stuck state with a pop up stating that the "Guided Access app unavailable. Please contact your administrator"

It won't take commands through jamf and won't install the app in question in this state, even doing a full restore kicks straight into this as soon as it get's an internet connection, before it can remove the profile.

Is there anyway to remove the profile or get around this requirement while it's like this?