So cut through its quite ok, the only problem is with engraving, in extreme cases, after setting 0.5mm depth on one end of x axis, the cutter does not touch the material on the other end.
That would imply the gantry or possibly front and back frame are well off square, with one side higher than the other. Another possibility is the sliders on the underside of the 300x180mm aluminum table extrusion are slightly different heights tilting the whole table. Start by determining how much out of level the table is with respect to the frame and gantry. You can do this by connecting the table and a sharp pointed tool e.g. an engraving D bit in the spindle to the controller's Z-probe (A5) and Gnd, and using a G38.2 probe command on the four corners of the table, noting the Z height of each. Ideally map the whole table in a grid, so you can check it isn't warped or bent. Some G-code senders have an auto-leveling function that can be used to make and save a probe heightmap automatically, saving you much effort.
Once you know how far vertically out of square the frame and gantry are with respect to the table, you can determine how and where to adjust them. Your frame should have been initially tightened on a very flat surface
*, *without* its feet fitted, and the gantry installed on the same surface to ensure it was initially sitting level. If you have had to move the gantry mounts to square it up or center the area of the table Y axis the spindle can reach, and did so without the frame directly on the good flat surface, that may have been when you introduced the tilt.
Once you know your frame is flat, you can loosen the gantry and on the flat surface, temporarily shim under one of its sides or under the opposite frame side to correct the tilt, then re-tighten the gantry mounting screws to lock the correction in. If there isn't enough adjustment range to square the gantry, you may need to add permanent shims between the table and the sliding bearings on one of the Y axis smooth rods.
N.B. you will probably need to come back and tilt the gantry front to back to tram the spindle, so note what temporary shims you used.
Once you've got it as close to square as you can, rough tram the spindle, then fly-cut the surface of a spoilboard, retram the spindle and any remaining Z height inconsistencies should be gone. If you ever remove the spoilboard, mark it and the table so you can reinstall it in the same position and orientation, and ideally avoid the need to resurface it.
* Ideally an engineer's surface plate, but a polished stone kitchen worktop is likely to be flat enough for any hobby CNC!