Well that's your main issue right there, the compact
UVB light that you're using is totally inadequate for a Bearded Dragon, and then if you also happen to have it on top of a mesh lid to the tank, that is blocking about 40% of the UVB/UVA light emitted by the already far too weak UVB compact bulb. And it's too far away from him, he would have to be about 3-4" away from that compact
UVB bulb and it would have to be totally unobstructed for him to get any adequate UVB/UVA from it, and it's not safe to have a light that close to him. So the shaking/tremors he's been displaying, as well as why he "doesn't like it in his 40 gallon tank" is because he's not getting any UVB or UVA light that he needs, and he's unfortunately started developing MBD.
Bearded Dragons must have a long, fluorescent UVB tube, and it also must be mounted correctly and within the correct distance from his basking spot/platform (based on what strength of tube you get for him), and it also has to be replaced either every 6 months (weaker T8 strength tubes) or every 12 months (stronger T5 tubes) because they stop emitting any
UVB light at all at those ages.
Since he is already suffering from a severe calcium deficiency and has already started displaying the symptoms of MBD, I advise you to totally skip over buying him a weaker T8 UVB tube and just going to the much stronger and more appropriate T5 UVB tube. It will also save you some money in the long run, because you only have to replace the stronger T5 UVB tubes every 10-12 months, where as you have to replace the much weaker T8 UVB tubes every 6 months at the oldest. Also, the much weaker T8 UVB tubes cannot sit on top of the mesh lid to the tank, they have to be strapped to the underside of the mesh lid, and they also must be within at least 6" of his basking spot/platform at all times. In contrast, the much stronger T5 UVB tubes can sit on top of the mesh lid to the tank as long as the tube is within at least 10-11" of his basking spot/platform.
The T5 strength UVB tube you buy must be at least a 10% UVB tube (or 10.0, it cannot be a 5.0 or 5% UVB tube), and you do not ever want to buy any of the cheaper, Chinese-made brands such as Zilla, All Living Things, ReptileOne, Trixie, etc. These UVB tube brands are not only weaker, but they all seem to emit harmful light rays that always cause eye damage, blindness, and neurological damage. So you need to buy either a Reptisun 10.0 T5HO UVB tube, or an Arcadia 12% T5 UVB tube, and then a long, T5-rated tube fixture that includes a reflector inside it so that adequate UVB and UVA light is reflected throughout the 40 gallon breeder tank (FYI, the UVA light is not emitted by your white basking bulb, it only emits bright white basking light and heat, the box probably says "UV Bulb", but not UVA; both the UVB AND UVA light are emitted by his
UVB light, and so he's also lacking in that, as the compact UVB bulbs emit below 30% UVB as well)...
The cheapest place by far to buy a T5 UVB tube and the fixture for it is on Amazon.com, and not only are they cheaper, but it's difficult to find a 10.0 T5 UVB tube in pet shops; Petco and PetSmart only carry a Reptisun package deal that includes a T5-rated Hood Fixture and a 5.0 T5HO tube that is not at all adequate for a Bearded Dragon, the 5% T5 and T8 tubes are for Tropical Reptiles.
For a 40 Gallon Breeder Tank you want at least a 22" or longer T5 UVB tube, and you can buy a 22" Reptisun 10.0 T5HO UVB tube on Amazon.com for around $24 shipped. They also have one 24" T5-rated fixture THAT INCLUDES A REFLECTOR IN IT (crucial for a larger tank) for about $28. So for a little over $50 shipped you can get both the T5 UVB tube and a fixture for it...Just another FYI, this 10% T5 UVB tube is a 24 watt UVB tube, so you can see how inadequate the 13 watt compact
UVB bulb with no reflector is for him and why it's made him sick...
Also another reason that he may not "like being in his tank" is improper temperature zones...Do you use only stick-on thermometers to measure his tank temps, or do you have either a Temperature Gun or a Digital Probe Thermometer? If you don't have either a Gun or a Probe Thermometer ($10 at any Petco or PetSmart) then you have absolutely no way of measuring his Basking Spot Surface Temperature at all, as stick-on thermometers can only measure Ambient or Air Temps,. and they are also usually off by between 10-20 degrees to the low side. So if you have a stick-on thermometer on the Hot Side of his tank, this is not telling you his Basking Spot Temperature, it's telling you his Hot Side Ambient (air) Temperature.
BASKING SPOT SURFACE TEMPERATURE (Basking Spot/Platform located within the Hot Side of the tank and positioned directly under both the UVB tube and the bright-white colored Basking Bulb; this is a SURFACE TEMPERATURE and must be measure with either a Gun or a Probe Thermomter): For a baby or juvenile under a year old should be between 105-110 degrees F maximum; For an adult that is over a year old should be between 100-105 degrees F maximum; 110 DEGREES F SHOULD BE THE HOTTEST TEMPERATURE LOCATED ANYWHERE INSIDE A BEARDED DRAGON'S TANK, AND THIS IS A SURFACE TEMP, NOT AN AIR TEMP!!!
HOT SIDE AMBIENT (air) TEMPERATURE (The Ambient or Air Temperature of the Hot Side of the tank, which is surrounding the Basking Spot/Platform): Should be between 88-93 degrees F maximum; 93 DEGREES F SHOULD BE THE HOTTEST AIR TEMPERATURE LOCATED ANYWHERE INSIDE A BEARDED DRAGON'S TANK!!!
COOL SIDE AMBIENT (air) TEMPERATURE (The Ambient or Air Temperature of the Cool Side of the tank, which is the side of the tank opposite of the Hot Side): Should be between 75-80 degrees F maximum, and this is very important, as he always needs a place to go to that is considerably cooler than the air temperature of the Hot Side of the tank.
****So if you have no way to actually measure the Basking Spot Surface Temperature and are only using stick-on thermometers, and let's just for example say that the stick-on thermometer on the Hot Side of the tank reads between 100-110 degrees F, and you've been thinking that this is actually his Basking Spot Surface Temperature, which it's not, it's actually the Hot Side Ambient (air) Temperature, which should be between 88-93 degrees F MAXIMUM, you can see the problem, his Hot Side Ambient (air) Temperature is at least 10 degrees too hot, maybe even more!!! In addition, if this is the case (as it often is), that also means that his actual Basking Spot Surface Temperature is naturally a good bit hotter than the surrounding Ambient (air) temperature, meaning that it's actually well hotter than 110 degrees F, which means he can't even stand to sit on his Basking Spot/Platform. I don't know if this is the case here or not, but it often is, as people don't realize that the Hot Side Ambient Temp is not the same as the Basking Spot Temp. This causes severe dehydration and sometimes is fatal...so if this is the case then you need to pick up a $10 Digital Probe Thermometer ASAP, put the Probe directly on his Basking Spot/Platform, wait 20-30 minutes, then read the temperature, and if it's over 110 degrees F then you need to either raise the bright-white colored Basking Bulb up and away from the tank, or just go down to a lower wattage of bright-white colored Basking Bulb (if you actually have a stick-on thermometer located in the Hot Side of the tank that is reading hotter than 93 degrees then you need to do this immediately anyway, don't wait to go get a Digital Probe Thermometer)....
If you already are using a Digital Probe Thermometer or a Gun and all 3 temperature zones are within the correct ranges, then your main issue is getting him a proper UVB tube immediately, which is not optional and is crucial...The sooner you get the T5 UVB tube and T5-rated tube fixture with a reflector inside it, and get it on him for at least 13-14 hours a day, the sooner you will stop the progression of the calcium deficiency and the MBD, and the better the possibility of totally reversing any of the symptoms he is already displaying. (BOTH THE UVB TUBE AND THE BASKING BULB NEED TO BE ON EVERY SINGLE DAY FOR BETWEEN 13-14 HOURS MINIMUM)...
Also, he needs a phosphoruous-free, Reptile -Grade Calcium supplement 5 times a week, and a Reptile-Grade multivitamin 3 times a week. Once he is under the T5 UVB tube for 13-14 hours every day, he will start to absorb, process, and use the nutritional supplements, as well as the nutrition in his food, and his bone density will start to strengthen.