Polygon pour over keep-out layer
Personally, I use the built-in Board Outline Clearance rule located within the "Manufacturing" category:



This should produce a DRC error if components or traces are placed too close to the outline (if it lets you place them too close in the first place), and will also prevent polygon pours from pouring too close or outside of the outline.