17720/17721 invalid project link in timelines table and cut off modal close icon

https://community.openproject.org/work_packages/17720
https://community.openproject.org/work_packages/17721
@ulferts my initial suggestion was for a solution like ce16d0d2, but since this is also an issue the on 4.0, @hschink's solution is more appropriate.