When a name is problematic
I think there is a bit of nuance in all of this. On the one hand, the official name may be relevant to identify what exactly we are referring to. On the other hand, the SE network has a code of conduct that protects users against specific things that may offend users.
The official name (or the bill number or whatever unambiguously defines the bill) would normally be a good way to refer to it.
In this case, it has been noted by multiple users that the name of the bill itself may be offensive in ways that the code of conduct doesn't allow. Specifically, the code of conduct says:
We don’t tolerate any language likely to offend or alienate people based on race, gender, sexual orientation, or religion — and those are just a few examples. Use stated pronouns (when known). When in doubt, don't use language that might offend or alienate.
That leaves some room for interpretation as to what exactly is protected besides race, gender, sexual orientation and religion. In our case, though, it's offensive based on sexual orientation so it clearly falls within the scope of that part of the code of conduct. If it's not entirely clear what the reasoning is, tim's comment explains it quite clearly:
I assume you mean this law? Calling an anti-LGBT law - which isn't related to pedophilia, but about restricting free speech in regards to what bigots consider "promoting homosexuality" - "pedophilia act" seems questionable to me (equating Homosexuality to pedophilia is certainly likely to alienate people). I would suggest to edit the question to 1) contain a link to an article about the law in question and 2) use less offensive language.
How to proceed?
There are a number of steps that can we take to deal with problematic content when there's still a reasonable need to post it.
It's a bit subjective which ones should be applied. I think it mostly depends on how problematic the language in question is. Then again, the yardstick is relatively simple, from the code of conduct:
any language likely to offend or alienate people based on race, gender, sexual orientation, or religion ...
Avoid using the offensive name in the title
When considering a question, the title is the most featured element. Titles will appear on the main page of our site and it may even appear in the side bar on other sides in the network. Furthermore, if a question hits HNQ the title will be seen by a lot of people, even if they are not interested in the question.
As such, it makes sense to avoid offensive names in the title of a question. Or as Shog9 put it some years ago:
There's precious little value and plenty of potential harm from scattering vulgar language across the sidebars of the entire network. Not only does it irritate people, the titles also get indexed in search results as part of the pages they're linked from - we've gotten complaints from folks who found their questions listed in search results for some fairly shocking phrases due to this.
Using scare quotes to distance oneself
This was suggested under the question in a comment by Italian Philosophers 4 Monica (selective quote):
But would this question's title be partially improved by putting "anti-gay Pedophilia Act" between quotes? That dissociates the question somewhat from the claims made by the law's title and phrasing.
I don't think this would be preferable for the title (for reasons stated under the previous heading), but I think it's a suitable option for the question body.
Using spoiler tags
In case the name is so offensive that we wouldn't even want to show it directly in the question body yet there is a compelling reason to post it, then spoiler tags with a warning are suitable.
That would look something like this (warning, possibly disturbing content here):
disturbing content here
In any case, we always have to be mindful about the need to post offensive content. Something that is clearly on-topic here (e.g. the name of a law or of a politician) is allowed some leeway but we should think about the necessity. If there are reasonable alternatives that work as well as the offensive option then I think that's preferred.
Going by the Wikipedia article of the law in question, a commonly used euphemism is: Hungary's anti-LGBT law. I think that works well for the question title. I also think it works well as an alternative in the question body, for example after the offensive name has been used once with scare quotes.
In the end, these things are often balancing acts. What works in one case may not work in another case and it's a great opportunity for rules-lawyering. As a moderator, I prefer to err on the side of caution when there are reasonable concerns of code of conduct violations. After all, the goal of the code of conduct is to provide an environment rooted in mutual respect (among other things).