A man who has diabetes needs to have a sensor on the arm for measuring blood glucose which is inserted into the arm through a needle and tapes. Is ghusl valid in such a case since he cannot remove the sensor during ghusl?

If you were not obliged to use, it may not be used, because it prevents washing. But if you are obliged to use it, then your job is to perform tayammum instead of ghusl, and you must do ghusl when changing it.

Do Tayammum once instead of ghusl, and then wudhu for the rest of the prayers, till you remove it, and if another janabah took place in between, then you need to do another tayammum for the new janabah.