When you upgraded to Moodle 5.0.x, the questions that used to be in the system context should have been moved to an equivalent module context. So, if that did not happen, there is probably a bug, and it would be good to understand it, so it can be fixed.
Can you provide any further information? For example which questions are in the wrong context? Can you look at the task logs for the transfer_question_categories and transfer_questions Ad-hoc tasks, which will have run just after you upgraded your site. Are there any interesting error messages in there?
Can you provide any further information? For example which questions are in the wrong context? Can you look at the task logs for the transfer_question_categories and transfer_questions Ad-hoc tasks, which will have run just after you upgraded your site. Are there any interesting error messages in there?