Germany has an entire law around this which came into force 1957: https://www.gesetze-im-internet.de/arbnerfg/__49.html
Many work contracts don't have clauses for inventions related to your field of employment because there's no ambiguity.
Most patches would not fall under the law, but entire libaries or novel approaches might. (basically anything patent-worthy)