How to control for a variable in a (Cox) regression, but not include it in a predictive model? I have been analysing some survival datasets for lung transplant patients for the past several months. I have found some variables that are statistically significant - such as year of transplant and transplant centre - but which aren't appropriate to include in a predictive model for predicting outcomes with new data.
For example, if I've modelled using data from 2012 - 2022, moving forward I can't just plug in 2023, 2024, 2025 and so on for the year of transplant.
Also, there are five transplant centres labelled A - E, they are included in the Cox model as factors. If one transplant centre has better outcomes, putting the centre in the model would likely result in a feedback loop where that centre receives even more donor offers, which is unfair for patients at other centres.
I feel like it isn't correct to just ignore these variables, but I'm not sure exactly how to include these variables in a predictive/prognostic model. Should I include them but for all future patients just set the value to the reference level? Or is there some other way of accounting for them that I am missing?

You job in modeling is to be true to the data, so that stakeholders can apply the results appropriately. As Björn said in a comment, much depends on how the model will be used.
Centers need to be in the model. If there are significant systematic differences among transplant centers after differences in patient characteristics and the difficulties of procedures are taken into account, then that issue needs to be addressed. Although you worry about implications for distribution of future organ donations, one might argue that donations ought to be focused on the most successful centers, and transplant patients should be directed to those centers. Furthermore, your results could help identify why some centers are less successful than others and eventually help improve their performance.
In terms of transplant year, modeling might provide some ability to make reasonable informed projections. Ideally you are not modeling each year as a separate factor but are handling it in a smooth continuous form, for example with a natural regression spline. If there is evidence of a continuing trend in success over recent calendar time, then stakeholders can use the information from the model along with understanding of the subject matter to determine whether it makes sense to project that trend for a few years into the future or simply carry forward predictions based on the most recent year.
