Yes, that’s perfectly fine! Just make sure that the thermometer’s probe is inserted all the way to the safety line in the meat, otherwise it may indicate overheating.
However, remember that the oven must not exceed 300°C to ensure the thermometer functions properly.