It amuses me I guess.
Also I am trying to steal ideas.
Well if its ideas we're wanting... Then I suppose I can help somewhat. I'll tell you how I do it in my own story, Birthright, since honestly figuring out the details was something I worked on for a while.
So, Birthright is a hybrid sci-fi fantasy setting. And it was important to me to make the sci-fi elements useful, but ultimately still less powerful than magic stuff. Because magic stuff has the inherent disadvantage of taking much more individual talent and artisanry, it has an inherent disadvantage compared to mass-produced technology. So in order for it to be useful, it has to have a notable advantage.
Now the problem is that if its just a straightforward "guns are less effective against magic things" then I run into a problem; that makes small arms basically worthless as they wouldnt be able to do anything, while making super-heavy artillery still outcompete magic in that field. So I needed a different approach.
The first step is to focus not on making tech weaker but magic stronger. It personally bugs me when guns and other modern weapons are able to easily kill creatures which can face-tank magical attacks like dragonbreath, fireballs, huge super-lasers, etc. But the problem is largely that we're not comparing modern ballistic weapons to the flashier magic spells, but rather to the simpler 'swords and bows' part of fantasy. The approach here is that all weapons which are based on a wielders own strength, as opposed to weapons which are independant of the wielders strength, are augmented by the wielders Soul in a metaphysical contest of strength as much as a physical one. This doesnt just mean melee weapons to be clear; a 'mundane' weapon is anything which doesnt derive its killing power from the wielders personal strength. That means chainsaws, guns, artillery, etc. tends to have the least effect from the wielders soul, while things like crossbows, compound bows, or pikes are kinda in a middle ground. They use some of the wielders physical strength but a lot more of the killing power comes from the mechanisms that store energy in the first two, or using the enemies own momentum against them in the latter case.
So then theres the need to keep really strong kinetic weapons (Railguns, tank guns, artillery, etc.) from being too overwhelmingly powerful. This is the part that seems to bug you. As these types of weapons are largely not based on the wielders own strength they fall off in effectiveness depending on the strength of the enemies Soul. To be clear, this isnt just a "Some things are magic and get immunity to all non-magic attacks", its more of a gradual falloff. The stronger a creature is the more this matters. All magic things have some resistance, but that resistance is not necessarily linear. it's important to note though that magical resistance is not linearly proportionate to the strength of the attack, so its pretty difficult to brute force your way through it.
Having said that, heavy weaponry can still pose a significant threat to magical creatures. Here is where the third key part comes into play. Even mundane weapons are bolstered to some extent by the talent and ability of the wielder, but this is most relevant the more 'direct' the conflict is. In one of the first chapters of my story, someone tries to shoot a magic-wielding aristocrat with their sniper rifle; it hurts them, but they're still able to keep fighting. And once they start using magical shields, its treated as basically impossible to get through. However, when the same person charges the aristocrat and forcibly rams the barrel of the gun under their chin and pulls the trigger, that kills them instantly; they backed up the gun with their own strength and finesse, and as a result backed it up to some extent with their own metaphysical 'presence' or 'force' in the conflict.
This applies in the other direction as well though. The more 'indirect' a means of attack is the less likely it is to be effective against magic. Suppressive fire with machine guns, massed volleys of archers, indirect artillery bombardments, fire-and-forget missiles... Things like this all are less effective against magic specifically because they're less targeted and the person doing the attacking has less metaphysical 'presence' behind the attack. The aggression is less 'focused'.
This mostly is shown less by actually weakening the force of the attack, and more like 'probability manipulation'. In fact, that 'probability manipulation' is a central part of how I write magic dealing with technology. The wards arent just making the creature ridiculously durable (though there is an aspect of that) but rather its closer to making them ridiculously
lucky. Massed artillery fire just 'coincidentally' produces shrapnel that doesnt hit the creature in question. Undirected machine gun or arrow fire 'conveniently' hits the thickest parts of the armor. Things like that. This still applies even when they are locked in melee combat, but its far less effective. And to be clear; Putting personal effort and more 'directed' aggression into it still makes it more effective. A sniper has better odds of hitting a mage than a dozen machine-gunners. A tank crew gunner is much more likely to wound a dragon than a battery of howitzers. A guy with a shoulder-mounted rocket launcher is more likely to kill a chimera than an air-to-ground missile fired from a drone. Things like that.
In this way, heavier technological weapons are still
useful, particularly against less magical opponents, but its harder to just no-sell the really-powerful-ancient-dragon by just bombarding it into the stone age with massed artillery salvos. And by the same token, small arms are still
useful especially against less-magically inclined enemies or even somewhat more magically inclined enemies if you just have enough talent to back it up. The more of yourself that you put into a fight, the less effective magical protection is. Also, less 'mundane' weapons are more effective against magic; this applies to some technologically produced weapons too if they have a stronger elemental component. Lasers, flamethrowers, freeze rays... Things like that.
This whole system is also kinda how I internally justify characters being able to go on adventures and not just assume they're going to die. Since realistically if you get into a thousand fights, you're basically guaranteed to die from bad luck no matter how good you are. But magical things just have enough metaphysical 'presence' in reality that the odds kinda warp in their favor, and they end up with much lower attrition rates as a result. To be clear, I'm not saying they are consistently always fine with the worst possible odds. Its more like, I try to write them with about the same odds of survival as fantasy characters usually do in stories, and this is more of an internal justification for why named characters arent constantly dropping like flies, since it always bugs me in fantasy series when characters are constantly going up against horrific odds and just somehow never seem to just die.
Finally, I do have some tweaks to the laws of physics to avoid the most overkill weapons because Mutually Assured Destruction is just no fun. There are no nuclear physics in Birthright; The fundamental forces of reality are the Electromagnetic force, the Gravitational force, and the Arcanoforce, i.e. magic. There are no particles smaller than atoms, and elements can only be converted between eachother through magic (i.e. alchemy). No fusion, no fission, but everything else is fair game. So theres lasers, railguns, cruise missiles, plasma weaponry, etc. But no nukes.