What are the limits of the Divinely ordained but ungodly authorities over a believer?
Lawful authority must be exercised lawfully, but even if not, we have some obligations to those God has ordained over us.
A few thoughts
Let every soul be subject unto the higher powers. For there is no power but of God: the powers that be are ordained of God. Whosoever therefore resisteth the power, resisteth the ordinance of God: and they that resist shall receive to themselves damnation (judgement). For rulers are not a terror to good works, but to the evil. Wilt thou then not be afraid of the power? do that which is good, and thou shalt have praise of the same: For he is the minister of God to thee for good. But if thou do that which is evil, be afraid; for he beareth not the sword in vain: for he is the minister of God, a revenger to execute wrath upon him that doeth evil.
Wherefore ye must needs be subject, not only for wrath, but also for conscience sake. For for this cause pay ye tribute also: for they are God’s ministers, attending continually upon this very thing.
Taxes must be paid to state even whilst funding abortions, unlawful activity and unjust wars.
Even small, irksome and apparently unnecessary duties ought to be complied with as the Lord did Himself for His sake (Matt. 17.24-7 probably temple poll tax, Ex. 30.13) and for the keeping of peace. 1 Peter 2.13-15, Matt 5.40 (even hated & oppressive occupation army, think of Nazis in Jersey or France), Heb. 12.14, Rom. 12.18-19.
However God's Law takes absolute precedence.
No obedience required to unlawful law, on the contrary: 'Whether it be right in the sight of God to hearken unto you more than unto God, judge ye.' Acts 4.17-20.
Idolatry, immorality, dishonesty. 1 Pet. 4.16-17. Gen. 39.10, Dan. 1.8, 3.16-18. Est. 3.1-3.(see 1 Sam. 15.8 & Deut. 25.17-18) 1Sam 30.32.
Shadrach, Meshach and Abednego. Christian martyrs under Rome and Roman Catholicism.
Disobedience is often best expressed as an unanswerable question, rather than by stating direct defiance, Joh 18.23 and other examples above.
It underscores unreasonabless of demands.
Should then a Christian worker in the NHS agree to lie about a person's biological sex to keep the law?
It would be one thing to use a neutral pronoun like 'they'. Another altogether to lie.