I omitted Netherlands because while they did actually have lèse-majesté laws on the books, and prosecuted people under it, they abolished it after Trump's first presidency. OK, I am kidding, it had nothing at all to do with Trump, they just abolished it in 2020 without any connection to what happened in the US.
Belgium abolished similar law in 2023. Switzerland allows you to mock local politicians, but not foreign ones based in Switzerland (go figure). Portugal, Iceland, Denmark and Brazil still seem to have such codes, though I am not aware of any recent prosecutions (maybe they exist, I'm just lazy and don't want to make this into a whole M.Sc. thesis in political science).
France: https://www.france24.com/en/live-news/20230329-french-woman-...
Spain: https://www.catalannews.com/society-science/item/belgian-cou...
Poland: https://www.intellinews.com/polish-writer-faces-prison-for-c...
United Kingdom: https://www.washingtonpost.com/world/2022/09/13/queen-elizab... https://www.theguardian.com/world/2013/mar/16/activist-shock...
Italy: https://www.theguardian.com/world/article/2024/jul/18/italia...
Note in most of these cases people prosecuted faced graver consequences than not being let into the country, and were full citizens, not foreigners.