Movement not working when enabling input

very strange, try removing the mapping context when you switch to UI mode and add it back when you switch back, maybe that will reset it