It certainly does automatically make you subject to that jurisdiction if you want to continue to do business there smoothly. Consider compliance with European laws by American tech companies. Sure, Apple loves counter-suing the EC over the DMA, but that's very much participating in the legal system and thus being "subject". And when they lose all their appeals, they pay the fine, because otherwise they would be forced out of Europe.
Libya doesn't actually have a law requiring foreign companies to wear hijabs, but if they did, they could try to enforce it. The smart thing to do would be to stop doing business there. If you don't, they would probably force Libyan internet providers to block you, and maybe file charges against you and possibly your customers there. If you live in Europe, you could probably ignore the charges, but most people don't want that hanging over their heads, especially when your Libyan business has been shut down anyway.
Consider when Russia tried to impose a fine on Google that was worth more than the total amount of money that has ever existed globally. Google just stopped doing business in Russia, because obviously that was their only choice.