First we need to find a baseline. Dragons in fantasy behaves as a much smaller creature. It can change pose on demand, it can jump or even leap great distance, many times it body length. It is much more agile than an elephant thst is much smaller. So as a first step I offer to find a creature that has a similar agility. In my opinion it is bigger than a mouse - mouse is more agile, can jump tens of its body sizes, that would look extreme for a dragon. And it is smaller than a dog - a dog still has some limits to pose changing, it can jump but after a speed up phase, not so much from a spot, like a dragon can. I would say a cat is close in agility to dragons - maximum body size that can change pose without preparation, can leap a few body sizes, still can control its body orientation in flight.
So, why is it that important what animal dragon is similar to? Because we can use it to calculate everything, knowing body mass of a cat, 5kg, and a dragon, 500 tons. Mass difference is 100 000 times. In order to have similar biomechanics we can find a factor to scale all the mechanical properties.
Cubic root is 45 times - this shows linear size difference. Sanity check on creature size: cat is about 0.3m, dragon would be 14m. Close enough.
To solve the 'square-cube law', we need to take our biomechanical properties and multiply them by the third power of size to account for volume change, and then divide by second power to account for cross section of bones and muscles. Result is the same factor, first power, 45.
Bone strength is about 100 MPa. after scaling it properties up we would get 4500 MPa. We dont have practical materials in this range. Carbon fiber might suffice, but mandatory matrix for it will reduce it by a lot. Some single crystal materials might come close to this value. Or use some futuristic material like graphene in plastic matrix, will be about right. Barely possible, but within known physics.
Skin strength is about 20 MPa. Scaled up it would be 900 MPa. Which is achievable with kevlar in a matrix, except that kevlar doesnt stand water. Good but nothing exceptional here.
Muscles can create 0.4 Mpa of pressure. Scaled up it would be 18 Mpa, or 180 atm if hydraulics is used, which is similar to what we use in high end devices. Gears arent so good because pressure doesnt allow much force advantage. Electric motors directly can create only about the same 0.4 MPa and are not good as is. So hydraulics it is.
That was the fun part. Now lets talk problems. Cat's metabolic rate is 2 w/kg or so. Or about 10w for the whole cat. Dragon would have metabolic rate higher even per kg - becase its muscles are so much stronger. So I would expect dragon metabolic rate to be about 90 w/kg. It is extreme, but colibri is not that far off. But for the whole dragon that would mean 45 MW. Or about 20 tanks. Or 250 tons of meat to eat per day. That is a true unobtanium - to imagine a world where this creature can feed.
https://www.nytimes.com/2021/04/15/science/tyrannosaurus-rex-population.html
Assuming your dragon would be as effective as Trex, only a hundred can live on Earth at once. After this point the sheer hunger of these creatures will disturb the ecosystems balance too much to be stable.
And now the ugly part. Thermodynamics. To cool down and keep its temperature under 40*C assuming outside temperature is 20 C, dragon would need about 2000 m3 of air per second to cool down. Thats not good. If internal temperature is increased to 1000 C, making it non-orgsnic for sure, air requirement drops to 64 m3 per second. Or assuming a large mouth of 1 m2 exchaust speed of 64 m/s. Similar to a sneeze. With such a metabolic rate dragon can resist heat exchange only a few hours. Then it must either breath heat out, or fly to cool down in the wind. Or reduce metabolic rate with a sleep or hibernation. Breathing requirement as oxidizer for fuel is about 15 m3/s. Or assuming a large mouth of 1m2 similar to a strong blowing when people do it.
In short it has to be a machine. Or magic. No biological system can allow such a heat exchange rate, unless it is in water probably. But not in air. No unobtanium can change the thermodynamics.
P.S. one possible option is 1600 tons of water per day to evaporate. Or it has to drink many times per day. Then air exchange need is reduced to about 200 m/s for a big 1 m2 mouth. Somewhat possible. Hibernating or flying most of the time could bring this requirement down by ten times, and then it is back to having a chance of being biological. No fur, no feathers, scaly skin could increace heat exchange area and turbulence, to cool better while in flight.
P.S.2 cooling is at best 1 MW, even with birds top speed. To use a flight to cool down the dragon will have to have 'meat fur'. Some sort of tissue that exposes blood vessels to the air and has a surface area that is many tens of times larger than dragons skin area. Bird feathers actually have blood vessel in their stem. Using this structure but without the fluffy part might do the trick - so the dragon will look like a hedgehog. But the spikes will be much smaller in comparison, so overall impresssion will make it look more like ordinary fur. And only when are close you could be able to see the spikes. Birds' feather stem is soft, not as dangerous as hedgehog's spike.